Merge
This commit is contained in:
commit
0e1a8bf85c
.hgtags-top-repoTHIRD_PARTY_READMEconfigure
common
autoconf
Makefile.inautogen.shbasics.m4boot-jdk.m4build-performance.m4compare.sh.inconfigureconfigure.acflags.m4generated-configure.shhelp.m4hotspot-spec.gmk.injdk-options.m4libraries.m4spec.gmk.intoolchain.m4
bin
hotspot
.hgtagsTHIRD_PARTY_README
agent/src
os/linux
share/classes/sun/jvm/hotspot
debugger/linux
memory
opto
tools
utilities/soql
make
Makefile
aix
Makefileadlc_updater
makefiles
adjust-mflags.shadlc.makebuild_vm_def.shbuildtree.makecompiler2.makecore.makedebug.makedefs.makedtrace.makefastdebug.makejsig.makejvmti.makemapfile-vers-debugmapfile-vers-jsigmapfile-vers-productppc64.makeproduct.makerules.makesa.makesaproc.maketop.maketrace.makevm.makexlc.make
platform_ppc64bsd/makefiles
defs.makeexcludeSrc.makehotspot.scriptlinux
makefiles
buildtree.makedefs.makedtrace.makegcc.makejsig.makeoptimized.makeppc64.makeproduct.makesaproc.maketop.makevm.make
platform_ppcplatform_ppc64solaris/makefiles
windows/makefiles
src/cpu/ppc/vm
@ -245,3 +245,4 @@ cd3825b2983045784d6fc6d1729c799b08215752 jdk8-b120
|
||||
1e1f86d5d4e22c15a9bf9f1581acddb8c59abae2 jdk9-b00
|
||||
50669e45cec4491de0d921d3118a3fe2e767020a jdk9-b01
|
||||
135f0c7af57ebace31383d8877f47e32172759ff jdk9-b02
|
||||
fd8d51bdf9aadf7ae83e65e8655c53581017c363 jdk9-b03
|
||||
|
1706
THIRD_PARTY_README
1706
THIRD_PARTY_README
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,4 +24,4 @@
|
||||
# This Makefile was generated by configure @DATE_WHEN_CONFIGURED@
|
||||
# GENERATED FILE, DO NOT EDIT
|
||||
SPEC:=@OUTPUT_ROOT@/spec.gmk
|
||||
include @SRC_ROOT@/Makefile
|
||||
include @TOPDIR@/Makefile
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -22,6 +22,23 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
generate_configure_script() {
|
||||
# First create a header
|
||||
cat > $1 << EOT
|
||||
#!/bin/bash
|
||||
#
|
||||
# ##########################################################
|
||||
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
|
||||
# ##########################################################
|
||||
#
|
||||
EOT
|
||||
# Then replace "magic" variables in configure.ac and append the output
|
||||
# from autoconf. $2 is either cat (just a no-op) or a filter.
|
||||
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
|
||||
eval $2 | ${AUTOCONF} -W all -I$script_dir - >> $1
|
||||
rm -rf autom4te.cache
|
||||
}
|
||||
|
||||
script_dir=`dirname $0`
|
||||
|
||||
# Create a timestamp as seconds since epoch
|
||||
@ -36,7 +53,8 @@ else
|
||||
fi
|
||||
|
||||
if test "x$CUSTOM_CONFIG_DIR" = "x"; then
|
||||
custom_script_dir="$script_dir/../../jdk/make/closed/autoconf"
|
||||
topdir=`cd $script_dir/../.. >/dev/null && pwd`
|
||||
custom_script_dir="$topdir/closed/autoconf"
|
||||
else
|
||||
custom_script_dir=$CUSTOM_CONFIG_DIR
|
||||
fi
|
||||
@ -45,25 +63,23 @@ custom_hook=$custom_script_dir/custom-hook.m4
|
||||
|
||||
AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
|
||||
|
||||
echo "Autoconf found: ${AUTOCONF}"
|
||||
|
||||
if test "x${AUTOCONF}" = x; then
|
||||
echo You need autoconf installed to be able to regenerate the configure script
|
||||
echo Error: Cannot find autoconf 1>&2
|
||||
echo "You need autoconf installed to be able to regenerate the configure script"
|
||||
echo "Error: Cannot find autoconf" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Generating generated-configure.sh with ${AUTOCONF}
|
||||
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | ${AUTOCONF} -W all -I$script_dir - > $script_dir/generated-configure.sh
|
||||
rm -rf autom4te.cache
|
||||
autoconf_version=`$AUTOCONF --version | head -1`
|
||||
echo "Using autoconf at ${AUTOCONF} [$autoconf_version]"
|
||||
|
||||
echo "Generating generated-configure.sh"
|
||||
generate_configure_script "$script_dir/generated-configure.sh" 'cat'
|
||||
|
||||
if test -e $custom_hook; then
|
||||
echo Generating custom generated-configure.sh
|
||||
# We have custom sources available; also generate configure script
|
||||
# with custom hooks compiled in.
|
||||
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
|
||||
sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
|
||||
rm -rf autom4te.cache
|
||||
echo "Generating custom generated-configure.sh"
|
||||
generate_configure_script "$custom_script_dir/generated-configure.sh" 'sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"'
|
||||
else
|
||||
echo No custom hook found: $custom_hook
|
||||
echo "(No custom hook found at $custom_hook)"
|
||||
fi
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -126,7 +126,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
|
||||
done
|
||||
IFS="$IFS_save"
|
||||
else
|
||||
AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.])
|
||||
# This is an absolute path, we can use it without further modifications.
|
||||
new_path="$path"
|
||||
fi
|
||||
|
||||
@ -418,14 +418,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
[
|
||||
# Locate the directory of this script.
|
||||
SCRIPT="[$]0"
|
||||
AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
|
||||
|
||||
# Where is the source? It is located two levels above the configure script.
|
||||
# Save the current directory this script was started from
|
||||
CURDIR="$PWD"
|
||||
cd "$AUTOCONF_DIR/../.."
|
||||
SRC_ROOT="`$THEPWDCMD -L`"
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
PATH_SEP=";"
|
||||
@ -433,13 +427,21 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
else
|
||||
PATH_SEP=":"
|
||||
fi
|
||||
|
||||
AC_SUBST(SRC_ROOT)
|
||||
AC_SUBST(PATH_SEP)
|
||||
cd "$CURDIR"
|
||||
|
||||
BASIC_FIXUP_PATH(SRC_ROOT)
|
||||
# We get the top-level directory from the supporting wrappers.
|
||||
AC_MSG_CHECKING([for top-level directory])
|
||||
AC_MSG_RESULT([$TOPDIR])
|
||||
AC_SUBST(TOPDIR)
|
||||
|
||||
# We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
|
||||
BASIC_FIXUP_PATH(CURDIR)
|
||||
BASIC_FIXUP_PATH(TOPDIR)
|
||||
# SRC_ROOT is a traditional alias for TOPDIR.
|
||||
SRC_ROOT=$TOPDIR
|
||||
|
||||
# Locate the directory of this script.
|
||||
AUTOCONF_DIR=$TOPDIR/common/autoconf
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
|
||||
# Add extra search paths on solaris for utilities like ar and as etc...
|
||||
@ -487,13 +489,17 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# Test from where we are running configure, in or outside of src root.
|
||||
AC_MSG_CHECKING([where to store configuration])
|
||||
if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
|
||||
|| test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
|
||||
|| test "x$CURDIR" = "x$SRC_ROOT/make" ; then
|
||||
# We are running configure from the src root.
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
AC_MSG_RESULT([in default location])
|
||||
CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
|
||||
else
|
||||
AC_MSG_RESULT([in build directory with custom name])
|
||||
fi
|
||||
OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
|
||||
$MKDIR -p "$OUTPUT_ROOT"
|
||||
@ -509,6 +515,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
|
||||
fi
|
||||
OUTPUT_ROOT="$CURDIR"
|
||||
AC_MSG_RESULT([in current directory])
|
||||
|
||||
# WARNING: This might be a bad thing to do. You need to be sure you want to
|
||||
# have a configuration in this directory. Do some sanity checks!
|
||||
@ -558,9 +565,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
|
||||
# which will look for generated configurations
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
|
||||
|
||||
# Save the arguments given to us
|
||||
echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
|
||||
|
@ -341,39 +341,45 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
[
|
||||
##############################################################################
|
||||
#
|
||||
# Specify options for anything that is run with the Boot JDK.
|
||||
# Specify jvm options for anything that is run with the Boot JDK.
|
||||
# Not all JVM:s accept the same arguments on the command line.
|
||||
#
|
||||
AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
|
||||
[specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
|
||||
[specify JVM arguments to be passed to all java invocations of boot JDK, overriding the default values,
|
||||
e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
|
||||
|
||||
if test "x$with_boot_jdk_jvmargs" = x; then
|
||||
# Not all JVM:s accept the same arguments on the command line.
|
||||
# OpenJDK specific increase in thread stack for JDK build,
|
||||
# well more specifically, when running javac.
|
||||
if test "x$BUILD_NUM_BITS" = x32; then
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# Running Javac on a JVM on a 64-bit machine, the stack takes more space
|
||||
# since 64-bit pointers are pushed on the stach. Apparently, we need
|
||||
# to increase the stack space when javacing the JDK....
|
||||
STACK_SIZE=1536
|
||||
fi
|
||||
AC_MSG_CHECKING([flags for boot jdk java command] )
|
||||
|
||||
# Minimum amount of heap memory.
|
||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
|
||||
# Why does macosx need more heap? Its the huge JDK batch.
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
|
||||
else
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
|
||||
fi
|
||||
# When is adding -client something that speeds up the JVM?
|
||||
# ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
|
||||
# Disable special log output when a debug build is used as Boot JDK...
|
||||
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
|
||||
# Starting amount of heap memory.
|
||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
# Maximum amount of heap memory.
|
||||
# Maximum stack size.
|
||||
if test "x$BUILD_NUM_BITS" = x32; then
|
||||
JVM_MAX_HEAP=1100M
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
|
||||
# pointers are used. Apparently, we need to increase the heap and stack
|
||||
# space for the jvm. More specifically, when running javac to build huge
|
||||
# jdk batch
|
||||
JVM_MAX_HEAP=1600M
|
||||
STACK_SIZE=1536
|
||||
fi
|
||||
ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
# Disable special log output when a debug build is used as Boot JDK...
|
||||
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
# Apply user provided options.
|
||||
ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs])
|
||||
|
||||
# For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
|
||||
JAVA_FLAGS=$boot_jdk_jvmargs
|
||||
|
||||
AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
|
||||
AC_SUBST(JAVA_FLAGS, $JAVA_FLAGS)
|
||||
])
|
||||
|
@ -261,7 +261,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
||||
|
||||
if test "x$ENABLE_PRECOMPH" = xyes; then
|
||||
# Check that the compiler actually supports precomp headers.
|
||||
if test "x$GCC" = xyes; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
AC_MSG_CHECKING([that precompiled headers work])
|
||||
echo "int alfa();" > conftest.h
|
||||
$CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -64,7 +64,7 @@ UNIQ="@UNIQ@"
|
||||
UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200"
|
||||
UNZIP="@UNZIP@"
|
||||
|
||||
SRC_ROOT="@SRC_ROOT@"
|
||||
SRC_ROOT="@TOPDIR@"
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
PATH="@VS_PATH@"
|
||||
|
97
common/autoconf/configure
vendored
97
common/autoconf/configure
vendored
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -22,19 +22,26 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
if test "x$BASH_VERSION" = x; then
|
||||
echo This script needs bash to run.
|
||||
echo It is recommended to use the configure script in the source tree root instead.
|
||||
exit 1
|
||||
if test "x$1" != xCHECKME; then
|
||||
echo "WARNING: Calling the wrapper script directly is deprecated and unsupported."
|
||||
echo "Not all features of configure will be available."
|
||||
echo "Use the 'configure' script in the top-level directory instead."
|
||||
TOPDIR=$(cd $(dirname $0)/../.. > /dev/null && pwd)
|
||||
else
|
||||
# Now the next argument is the absolute top-level directory path.
|
||||
# The TOPDIR variable is passed on to configure.ac.
|
||||
TOPDIR="$2"
|
||||
# Remove these two arguments to get to the user supplied arguments
|
||||
shift
|
||||
shift
|
||||
fi
|
||||
|
||||
CONFIGURE_COMMAND_LINE="$@"
|
||||
conf_script_dir=`dirname $0`
|
||||
conf_script_dir="$TOPDIR/common/autoconf"
|
||||
|
||||
if [ "$CUSTOM_CONFIG_DIR" = "" ]; then
|
||||
conf_custom_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf"
|
||||
conf_custom_script_dir="$TOPDIR/closed/autoconf"
|
||||
else
|
||||
conf_custom_script_dir=$CUSTOM_CONFIG_DIR
|
||||
conf_custom_script_dir="$CUSTOM_CONFIG_DIR"
|
||||
fi
|
||||
|
||||
###
|
||||
@ -110,14 +117,41 @@ fi
|
||||
if test "x$conf_debug_configure" = xtrue; then
|
||||
conf_debug_configure=recursive
|
||||
fi
|
||||
|
||||
###
|
||||
### Process command-line arguments
|
||||
###
|
||||
|
||||
# Returns a shell-escaped version of the argument given.
|
||||
function shell_quote() {
|
||||
if [[ -n "$1" ]]; then
|
||||
# Uses only shell-safe characters? No quoting needed.
|
||||
# '=' is a zsh meta-character, but only in word-initial position.
|
||||
if echo "$1" | grep '^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\.:,%/+=_-]\{1,\}$' > /dev/null \
|
||||
&& ! echo "$1" | grep '^=' > /dev/null; then
|
||||
quoted="$1"
|
||||
else
|
||||
if echo "$1" | grep "[\'!]" > /dev/null; then
|
||||
# csh does history expansion within single quotes, but not
|
||||
# when backslash-escaped!
|
||||
local quoted_quote="'\\''" quoted_exclam="'\\!'"
|
||||
word="${1//\'/${quoted_quote}}"
|
||||
word="${1//\!/${quoted_exclam}}"
|
||||
fi
|
||||
quoted="'$1'"
|
||||
fi
|
||||
echo "$quoted"
|
||||
fi
|
||||
}
|
||||
|
||||
conf_processed_arguments=()
|
||||
conf_quoted_arguments=()
|
||||
conf_openjdk_target=
|
||||
|
||||
for conf_option
|
||||
do
|
||||
|
||||
# Process (and remove) our own extensions that will not be passed to autoconf
|
||||
case $conf_option in
|
||||
--openjdk-target=*)
|
||||
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
|
||||
@ -128,18 +162,35 @@ do
|
||||
export conf_debug_configure
|
||||
fi
|
||||
;;
|
||||
[^-]*=*)
|
||||
# Add name of variable to CONFIGURE_OVERRIDDEN_VARIABLES list inside !...!.
|
||||
conf_env_var=`expr "x$conf_option" : 'x\([^=]*\)='`
|
||||
CONFIGURE_OVERRIDDEN_VARIABLES="$CONFIGURE_OVERRIDDEN_VARIABLES!$conf_env_var!"
|
||||
# ... and then process argument as usual
|
||||
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option")
|
||||
;;
|
||||
*)
|
||||
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option")
|
||||
;;
|
||||
esac
|
||||
|
||||
# Store all variables overridden on the command line
|
||||
case $conf_option in
|
||||
[^-]*=*)
|
||||
# Add name of variable to CONFIGURE_OVERRIDDEN_VARIABLES list inside !...!.
|
||||
conf_env_var=`expr "x$conf_option" : 'x\([^=]*\)='`
|
||||
CONFIGURE_OVERRIDDEN_VARIABLES="$CONFIGURE_OVERRIDDEN_VARIABLES!$conf_env_var!"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Save the arguments, intelligently quoted for CONFIGURE_COMMAND_LINE.
|
||||
case $conf_option in
|
||||
*=*)
|
||||
conf_option_name=`expr "x$conf_option" : 'x\([^=]*\)='`
|
||||
conf_option_name=$(shell_quote "$conf_option_name")
|
||||
conf_option_value=`expr "x$conf_option" : 'x[^=]*=\(.*\)'`
|
||||
conf_option_value=$(shell_quote "$conf_option_value")
|
||||
conf_quoted_arguments=("${conf_quoted_arguments[@]}" "$conf_option_name=$conf_option_value")
|
||||
;;
|
||||
*)
|
||||
conf_quoted_arguments=("${conf_quoted_arguments[@]}" "$(shell_quote "$conf_option")")
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check for certain autoconf options that require extra action
|
||||
case $conf_option in
|
||||
-build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
@ -152,6 +203,9 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
# Save the quoted command line
|
||||
CONFIGURE_COMMAND_LINE="${conf_quoted_arguments[@]}"
|
||||
|
||||
if test "x$conf_legacy_crosscompile" != "x"; then
|
||||
if test "x$conf_openjdk_target" != "x"; then
|
||||
echo "Error: Specifying --openjdk-target together with autoconf"
|
||||
@ -181,10 +235,10 @@ conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arg
|
||||
###
|
||||
if test -e $conf_custom_script_dir/generated-configure.sh; then
|
||||
# Custom source configure available; run that instead
|
||||
echo Running custom generated-configure.sh
|
||||
echo "Running custom generated-configure.sh"
|
||||
conf_script_to_run=$conf_custom_script_dir/generated-configure.sh
|
||||
else
|
||||
echo Running generated-configure.sh
|
||||
echo "Running generated-configure.sh"
|
||||
conf_script_to_run=$conf_script_dir/generated-configure.sh
|
||||
fi
|
||||
|
||||
@ -218,6 +272,13 @@ Additional (non-autoconf) OpenJDK Options:
|
||||
--debug-configure Run the configure script with additional debug
|
||||
logging enabled.
|
||||
|
||||
EOT
|
||||
|
||||
# Print list of toolchains. This must be done by the autoconf script.
|
||||
( CONFIGURE_PRINT_TOOLCHAIN_LIST=true . $conf_script_to_run PRINTF=printf )
|
||||
|
||||
cat <<EOT
|
||||
|
||||
Please be aware that, when cross-compiling, the OpenJDK configure script will
|
||||
generally use 'target' where autoconf traditionally uses 'host'.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -31,9 +31,9 @@
|
||||
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
|
||||
AC_INIT(OpenJDK, jdk9, build-dev@openjdk.java.net,,http://openjdk.java.net)
|
||||
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_AUX_DIR([$TOPDIR/common/autoconf/build-aux])
|
||||
m4_include([build-aux/pkg.m4])
|
||||
|
||||
# Include these first...
|
||||
@ -43,6 +43,7 @@ m4_include([builddeps.m4])
|
||||
# ... then the rest
|
||||
m4_include([boot-jdk.m4])
|
||||
m4_include([build-performance.m4])
|
||||
m4_include([flags.m4])
|
||||
m4_include([help.m4])
|
||||
m4_include([jdk-options.m4])
|
||||
m4_include([libraries.m4])
|
||||
@ -71,7 +72,11 @@ DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# Basic initialization that must happen first of all
|
||||
# If we are requested to print additional help, do that and then exit.
|
||||
# This must be the very first call.
|
||||
HELP_PRINT_ADDITIONAL_HELP_AND_EXIT
|
||||
|
||||
# Basic initialization that must happen first of all in the normal process.
|
||||
BASIC_INIT
|
||||
BASIC_SETUP_FUNDAMENTAL_TOOLS
|
||||
|
||||
@ -148,26 +153,41 @@ SRCDIRS_SETUP_OUTPUT_DIRS
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup the toolchain (compilers etc), i.e. the tools that need to be
|
||||
# cross-compilation aware.
|
||||
# Setup the toolchain (compilers etc), i.e. tools used to compile and process
|
||||
# native code.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
|
||||
# Locate the actual tools
|
||||
TOOLCHAIN_SETUP_PATHS
|
||||
# First determine the toolchain type (compiler family)
|
||||
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
|
||||
|
||||
# FIXME: Currently we must test this after paths but before flags. Fix!
|
||||
# Then detect the actual binaries needed
|
||||
TOOLCHAIN_PRE_DETECTION
|
||||
TOOLCHAIN_DETECT_TOOLCHAIN_CORE
|
||||
TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA
|
||||
TOOLCHAIN_POST_DETECTION
|
||||
|
||||
# And we can test some aspects on the target using configure macros.
|
||||
# Finally do some processing after the detection phase
|
||||
TOOLCHAIN_SETUP_BUILD_COMPILERS
|
||||
TOOLCHAIN_SETUP_LEGACY
|
||||
TOOLCHAIN_MISC_CHECKS
|
||||
|
||||
# Setup the JTReg Regression Test Harness.
|
||||
TOOLCHAIN_SETUP_JTREG
|
||||
|
||||
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.
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_BITS
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
|
||||
|
||||
# Configure flags for the tools
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_MISC
|
||||
FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS
|
||||
FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
|
||||
FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK
|
||||
FLAGS_SETUP_COMPILER_FLAGS_MISC
|
||||
|
||||
# Setup debug symbols (need objcopy from the toolchain for that)
|
||||
JDKOPT_SETUP_DEBUG_SYMBOLS
|
||||
@ -188,7 +208,7 @@ LIB_SETUP_FREETYPE
|
||||
LIB_SETUP_ALSA
|
||||
LIB_SETUP_MISC_LIBS
|
||||
LIB_SETUP_STATIC_LINK_LIBSTDCPP
|
||||
|
||||
LIB_SETUP_ON_WINDOWS
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
699
common/autoconf/flags.m4
Normal file
699
common/autoconf/flags.m4
Normal file
@ -0,0 +1,699 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
|
||||
[
|
||||
# Option used to tell the compiler whether to create 32- or 64-bit executables
|
||||
if test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
COMPILER_TARGET_BITS_FLAG="-q"
|
||||
else
|
||||
COMPILER_TARGET_BITS_FLAG="-m"
|
||||
fi
|
||||
AC_SUBST(COMPILER_TARGET_BITS_FLAG)
|
||||
|
||||
# FIXME: figure out if we should select AR flags depending on OS or toolchain.
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ARFLAGS="-r"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
ARFLAGS="-X64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# lib.exe is used as AR to create static libraries.
|
||||
ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
|
||||
else
|
||||
ARFLAGS=""
|
||||
fi
|
||||
AC_SUBST(ARFLAGS)
|
||||
|
||||
## Setup strip.
|
||||
# FIXME: should this really be per platform, or should it be per toolchain type?
|
||||
# strip is not provided by clang or solstudio; so guessing platform makes most sense.
|
||||
# FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
STRIPFLAGS="-g"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
STRIPFLAGS="-x"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
STRIPFLAGS="-S"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
STRIPFLAGS="-X32_64"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
POST_STRIP_CMD="$STRIP $STRIPFLAGS"
|
||||
fi
|
||||
AC_SUBST(POST_STRIP_CMD)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
# FIXME: break out into MCSFLAGS
|
||||
POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
|
||||
fi
|
||||
AC_SUBST(POST_MCS_CMD)
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
CC_OUT_OPTION=-Fo
|
||||
EXE_OUT_OPTION=-out:
|
||||
LD_OUT_OPTION=-out:
|
||||
AR_OUT_OPTION=-out:
|
||||
else
|
||||
# The option used to specify the target .o,.a or .so file.
|
||||
# When compiling, how to specify the to be created object file.
|
||||
CC_OUT_OPTION='-o$(SPACE)'
|
||||
# When linking, how to specify the to be created executable.
|
||||
EXE_OUT_OPTION='-o$(SPACE)'
|
||||
# When linking, how to specify the to be created dynamically linkable library.
|
||||
LD_OUT_OPTION='-o$(SPACE)'
|
||||
# When archiving, how to specify the to be create static archive for object files.
|
||||
AR_OUT_OPTION='rcs$(SPACE)'
|
||||
fi
|
||||
AC_SUBST(CC_OUT_OPTION)
|
||||
AC_SUBST(EXE_OUT_OPTION)
|
||||
AC_SUBST(LD_OUT_OPTION)
|
||||
AC_SUBST(AR_OUT_OPTION)
|
||||
|
||||
# On Windows, we need to set RC flags.
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
RC_FLAGS="-nologo -l 0x409 -r"
|
||||
if test "x$VARIANT" = xOPT; then
|
||||
RC_FLAGS="$RC_FLAGS -d NDEBUG"
|
||||
fi
|
||||
|
||||
# The version variables used to create RC_FLAGS may be overridden
|
||||
# in a custom configure script, or possibly the command line.
|
||||
# Let those variables be expanded at make time in spec.gmk.
|
||||
# The \$ are escaped to the shell, and the $(...) variables
|
||||
# are evaluated by make.
|
||||
RC_FLAGS="$RC_FLAGS \
|
||||
-d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
|
||||
-d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
|
||||
-d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
|
||||
-d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
|
||||
-d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
|
||||
-d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
|
||||
-d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
|
||||
fi
|
||||
AC_SUBST(RC_FLAGS)
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
|
||||
CCXXFLAGS="$CCXXFLAGS -nologo"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# How to compile shared libraries.
|
||||
#
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
PICFLAG="-fPIC"
|
||||
C_FLAG_REORDER=''
|
||||
CXX_FLAG_REORDER=''
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Linking is different on MacOSX
|
||||
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
|
||||
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
|
||||
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
else
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1'
|
||||
SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-Xlinker -soname=[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=[$]1'
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
PICFLAG="-KPIC"
|
||||
C_FLAG_REORDER='-xF'
|
||||
CXX_FLAG_REORDER='-xF'
|
||||
SHARED_LIBRARY_FLAGS="-G"
|
||||
SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN[$]1'
|
||||
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
PICFLAG="-qpic=large"
|
||||
C_FLAG_REORDER=''
|
||||
CXX_FLAG_REORDER=''
|
||||
SHARED_LIBRARY_FLAGS="-qmkshrobj"
|
||||
SET_EXECUTABLE_ORIGIN=""
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
PICFLAG=""
|
||||
C_FLAG_REORDER=''
|
||||
CXX_FLAG_REORDER=''
|
||||
SHARED_LIBRARY_FLAGS="-LD"
|
||||
SET_EXECUTABLE_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
fi
|
||||
|
||||
AC_SUBST(C_FLAG_REORDER)
|
||||
AC_SUBST(CXX_FLAG_REORDER)
|
||||
AC_SUBST(SHARED_LIBRARY_FLAGS)
|
||||
AC_SUBST(SET_EXECUTABLE_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_NAME)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
|
||||
CFLAGS_JDKLIB_EXTRA='-xstrconst'
|
||||
fi
|
||||
# The (cross) compiler is now configured, we can now test capabilities
|
||||
# of the target platform.
|
||||
])
|
||||
|
||||
# Documentation on common flags used for solstudio in HIGHEST.
|
||||
#
|
||||
# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
|
||||
# done with care, there are some assumptions below that need to
|
||||
# be understood about the use of pointers, and IEEE behavior.
|
||||
#
|
||||
# -fns: Use non-standard floating point mode (not IEEE 754)
|
||||
# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
|
||||
# -fsingle: Use single precision floating point with 'float'
|
||||
# -xalias_level=basic: Assume memory references via basic pointer types do not alias
|
||||
# (Source with excessing pointer casting and data access with mixed
|
||||
# pointer types are not recommended)
|
||||
# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
|
||||
# -xrestrict: Pointer parameters to functions do not overlap
|
||||
# (Similar to -xalias_level=basic usage, but less obvious sometimes.
|
||||
# If you pass in multiple pointers to the same data, do not use this)
|
||||
# -xlibmil: Inline some library routines
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
|
||||
|
||||
# FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
|
||||
# Bug?
|
||||
#if test "x$OPENJDK_TARGET_CPU" = xsparc; then
|
||||
# CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
|
||||
# CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
|
||||
#fi
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup the opt flags for different compilers
|
||||
# and different operating systems.
|
||||
#
|
||||
|
||||
# FIXME: this was indirectly the old default, but just inherited.
|
||||
# if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# C_FLAG_DEPS="-MMD -MF"
|
||||
# fi
|
||||
|
||||
# Generate make dependency files
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
C_FLAG_DEPS="-MMD -MF"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
C_FLAG_DEPS="-xMMD -xMF"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
C_FLAG_DEPS="-qmakedep=gcc -MF"
|
||||
fi
|
||||
CXX_FLAG_DEPS="$C_FLAG_DEPS"
|
||||
AC_SUBST(C_FLAG_DEPS)
|
||||
AC_SUBST(CXX_FLAG_DEPS)
|
||||
|
||||
# Debug symbols
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g1"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="-g1"
|
||||
else
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="-g"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g -xs"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="-g"
|
||||
fi
|
||||
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
|
||||
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
|
||||
|
||||
# Optimization levels
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
|
||||
# FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
|
||||
C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
|
||||
C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
|
||||
C_O_FLAG_NONE="-xregs=no%frameptr"
|
||||
CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
|
||||
CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
|
||||
CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
|
||||
CXX_O_FLAG_NONE="-xregs=no%frameptr"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
|
||||
C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
|
||||
CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
|
||||
C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
|
||||
C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
|
||||
C_O_FLAG_NONE=""
|
||||
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_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
|
||||
CXX_O_FLAG_NONE=""
|
||||
fi
|
||||
else
|
||||
# The remaining toolchains share opt flags between CC and CXX;
|
||||
# setup for C and duplicate afterwards.
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# On MacOSX we optimize for size, something
|
||||
# we should do for all platforms?
|
||||
C_O_FLAG_HIGHEST="-Os"
|
||||
C_O_FLAG_HI="-Os"
|
||||
C_O_FLAG_NORM="-Os"
|
||||
C_O_FLAG_NONE=""
|
||||
else
|
||||
C_O_FLAG_HIGHEST="-O3"
|
||||
C_O_FLAG_HI="-O3"
|
||||
C_O_FLAG_NORM="-O2"
|
||||
C_O_FLAG_NONE="-O0"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
C_O_FLAG_HIGHEST="-O3"
|
||||
C_O_FLAG_HI="-O3 -qstrict"
|
||||
C_O_FLAG_NORM="-O2"
|
||||
C_O_FLAG_NONE=""
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
C_O_FLAG_HIGHEST="-O2"
|
||||
C_O_FLAG_HI="-O1"
|
||||
C_O_FLAG_NORM="-O1"
|
||||
C_O_FLAG_NONE="-Od"
|
||||
fi
|
||||
CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
|
||||
CXX_O_FLAG_HI="$C_O_FLAG_HI"
|
||||
CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
|
||||
CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
|
||||
fi
|
||||
|
||||
AC_SUBST(C_O_FLAG_HIGHEST)
|
||||
AC_SUBST(C_O_FLAG_HI)
|
||||
AC_SUBST(C_O_FLAG_NORM)
|
||||
AC_SUBST(C_O_FLAG_NONE)
|
||||
AC_SUBST(CXX_O_FLAG_HIGHEST)
|
||||
AC_SUBST(CXX_O_FLAG_HI)
|
||||
AC_SUBST(CXX_O_FLAG_NORM)
|
||||
AC_SUBST(CXX_O_FLAG_NONE)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
|
||||
[
|
||||
# Special extras...
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
|
||||
CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
|
||||
CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
|
||||
fi
|
||||
|
||||
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
|
||||
fi
|
||||
|
||||
if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
|
||||
fi
|
||||
|
||||
if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
|
||||
[extra flags to be used when compiling jdk c-files])])
|
||||
|
||||
AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
|
||||
[extra flags to be used when compiling jdk c++-files])])
|
||||
|
||||
AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
|
||||
[extra flags to be used when linking jdk])])
|
||||
|
||||
CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
|
||||
|
||||
# Hotspot needs these set in their legacy form
|
||||
LEGACY_EXTRA_CFLAGS=$with_extra_cflags
|
||||
LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
|
||||
LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
|
||||
|
||||
AC_SUBST(LEGACY_EXTRA_CFLAGS)
|
||||
AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
|
||||
AC_SUBST(LEGACY_EXTRA_LDFLAGS)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Now setup the CFLAGS and LDFLAGS for the JDK build.
|
||||
# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
|
||||
#
|
||||
|
||||
# Setup compiler/platform specific flags to CFLAGS_JDK,
|
||||
# CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# these options are used for both C and C++ compiles
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
|
||||
-pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
|
||||
case $OPENJDK_TARGET_CPU_ARCH in
|
||||
arm )
|
||||
# on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
|
||||
;;
|
||||
ppc )
|
||||
# on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
|
||||
;;
|
||||
* )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
|
||||
;;
|
||||
esac
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
|
||||
CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
|
||||
fi
|
||||
|
||||
CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
|
||||
CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
|
||||
CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
|
||||
-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
|
||||
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
|
||||
-DWIN32 -DIAL"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
|
||||
fi
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
|
||||
# Adjust flags according to debug level.
|
||||
case $DEBUG_LEVEL in
|
||||
fastdebug )
|
||||
CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
|
||||
CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
|
||||
C_O_FLAG_HI="$C_O_FLAG_NORM"
|
||||
C_O_FLAG_NORM="$C_O_FLAG_NORM"
|
||||
CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
|
||||
CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
|
||||
JAVAC_FLAGS="$JAVAC_FLAGS -g"
|
||||
;;
|
||||
slowdebug )
|
||||
CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
|
||||
CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
|
||||
C_O_FLAG_HI="$C_O_FLAG_NONE"
|
||||
C_O_FLAG_NORM="$C_O_FLAG_NONE"
|
||||
CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
|
||||
CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
|
||||
JAVAC_FLAGS="$JAVAC_FLAGS -g"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Setup LP64
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
|
||||
|
||||
# Set some common defines. These works for all compilers, but assume
|
||||
# -D is universally accepted.
|
||||
|
||||
# Setup endianness
|
||||
if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
|
||||
# The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
|
||||
# Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
|
||||
# (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
|
||||
# Note: -Dmacro is the same as #define macro 1
|
||||
# -Dmacro= is the same as #define macro
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
|
||||
fi
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
|
||||
fi
|
||||
|
||||
# Setup target OS define. Use OS target name but in upper case.
|
||||
OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
|
||||
|
||||
# Setup target CPU
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
|
||||
|
||||
# Setup debug/release defines
|
||||
if test "x$DEBUG_LEVEL" = xrelease; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
|
||||
fi
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
|
||||
fi
|
||||
|
||||
# Setup release name
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
|
||||
|
||||
|
||||
# Set some additional per-OS defines.
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
# FIXME: PPC64 should not be here.
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
|
||||
fi
|
||||
|
||||
# Additional macosx handling
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# FIXME: This needs to be exported in spec.gmk due to closed legacy code.
|
||||
# FIXME: clean this up, and/or move it elsewhere.
|
||||
|
||||
# Setting these parameters makes it an error to link to macosx APIs that are
|
||||
# newer than the given OS version and makes the linked binaries compatible
|
||||
# even if built on a newer version of the OS.
|
||||
# The expected format is X.Y.Z
|
||||
MACOSX_VERSION_MIN=10.7.0
|
||||
AC_SUBST(MACOSX_VERSION_MIN)
|
||||
|
||||
# The macro takes the version with no dots, ex: 1070
|
||||
# Let the flags variables get resolved in make for easier override on make
|
||||
# command line.
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Setup some hard coded includes
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
|
||||
-I${JDK_OUTPUTDIR}/include \
|
||||
-I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
|
||||
-I${JDK_TOPDIR}/src/share/javavm/export \
|
||||
-I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
|
||||
-I${JDK_TOPDIR}/src/share/native/common \
|
||||
-I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
|
||||
|
||||
# The shared libraries are compiled using the picflag.
|
||||
CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
|
||||
CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
|
||||
|
||||
# Executable flags
|
||||
CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
|
||||
CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
|
||||
|
||||
AC_SUBST(CFLAGS_JDKLIB)
|
||||
AC_SUBST(CFLAGS_JDKEXE)
|
||||
AC_SUBST(CXXFLAGS_JDKLIB)
|
||||
AC_SUBST(CXXFLAGS_JDKEXE)
|
||||
|
||||
# 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
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
|
||||
fi
|
||||
# TODO: make -debug optional "--disable-full-debug-symbols"
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -debug"
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
|
||||
LDFLAGS_JDKLIB_SUFFIX=""
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||
LDFLAGS_STACK_SIZE=1048576
|
||||
else
|
||||
LDFLAGS_STACK_SIZE=327680
|
||||
fi
|
||||
LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
|
||||
else
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# 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
|
||||
if test -n "$HAS_GNU_HASH"; then
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
# And since we now know that the linker is gnu, then add -z defs, to forbid
|
||||
# undefined symbols in object files.
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
|
||||
if test "x$DEBUG_LEVEL" = "xrelease"; then
|
||||
# When building release libraries, tell the linker optimize them.
|
||||
# Should this be supplied to the OSS linker as well?
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
|
||||
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
|
||||
fi
|
||||
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
|
||||
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
|
||||
|
||||
# On some platforms (mac) the linker warns about non existing -L dirs.
|
||||
# Add server first if available. Linking aginst client does not always produce the same results.
|
||||
# Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
|
||||
# Default to server for other variants.
|
||||
if test "x$JVM_VARIANT_SERVER" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
|
||||
elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
|
||||
elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
|
||||
else
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
|
||||
fi
|
||||
|
||||
LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
|
||||
fi
|
||||
|
||||
LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LDFLAGS_JDKLIB)
|
||||
AC_SUBST(LDFLAGS_JDKEXE)
|
||||
AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
|
||||
AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
|
||||
AC_SUBST(LDFLAGS_CXX_JDK)
|
||||
])
|
||||
|
||||
|
||||
# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
|
||||
# [RUN-IF-FALSE])
|
||||
# ------------------------------------------------------------
|
||||
# Check that the c and c++ compilers support an argument
|
||||
AC_DEFUN([FLAGS_COMPILER_CHECK_ARGUMENTS],
|
||||
[
|
||||
AC_MSG_CHECKING([if compiler supports "$1"])
|
||||
supports=yes
|
||||
|
||||
saved_cflags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $1"
|
||||
AC_LANG_PUSH([C])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [],
|
||||
[supports=no])
|
||||
AC_LANG_POP([C])
|
||||
CFLAGS="$saved_cflags"
|
||||
|
||||
saved_cxxflags="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAG $1"
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [],
|
||||
[supports=no])
|
||||
AC_LANG_POP([C++])
|
||||
CXXFLAGS="$saved_cxxflags"
|
||||
|
||||
AC_MSG_RESULT([$supports])
|
||||
if test "x$supports" = "xyes" ; then
|
||||
m4_ifval([$2], [$2], [:])
|
||||
else
|
||||
m4_ifval([$3], [$3], [:])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
|
||||
[
|
||||
# Some Zero and Shark settings.
|
||||
# ZERO_ARCHFLAG tells the compiler which mode to build for
|
||||
case "${OPENJDK_TARGET_CPU}" in
|
||||
s390)
|
||||
ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
|
||||
;;
|
||||
*)
|
||||
ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
|
||||
esac
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS([$ZERO_ARCHFLAG], [], [ZERO_ARCHFLAG=""])
|
||||
AC_SUBST(ZERO_ARCHFLAG)
|
||||
|
||||
# Check that the compiler supports -mX (or -qX on AIX) flags
|
||||
# Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS([${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
|
||||
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
|
||||
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
|
||||
AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
|
||||
])
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -151,14 +151,46 @@ pkgadd_help() {
|
||||
PKGHANDLER_COMMAND=""
|
||||
}
|
||||
|
||||
# This function will check if we're called from the "configure" wrapper while
|
||||
# printing --help. If so, we will print out additional information that can
|
||||
# only be extracted within the autoconf script, and then exit. This must be
|
||||
# called at the very beginning in configure.ac.
|
||||
AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT],
|
||||
[
|
||||
if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
|
||||
$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"
|
||||
for toolchain in $VALID_TOOLCHAINS_all; do
|
||||
# Use indirect variable referencing
|
||||
toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
|
||||
TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
|
||||
$PRINTF " %-10s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
|
||||
done
|
||||
|
||||
# And now exit directly
|
||||
exit 0
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
[
|
||||
# Finally output some useful information to the user
|
||||
|
||||
printf "\n"
|
||||
printf "====================================================\n"
|
||||
printf "A new configuration has been successfully created in\n"
|
||||
printf "$OUTPUT_ROOT\n"
|
||||
if test "x$no_create" != "xyes"; then
|
||||
if test "x$IS_RECONFIGURE" != "xyes"; then
|
||||
printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
|
||||
else
|
||||
printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
|
||||
fi
|
||||
else
|
||||
if test "x$IS_RECONFIGURE" != "xyes"; then
|
||||
printf "A configuration has been successfully checked but not created\n"
|
||||
else
|
||||
printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
|
||||
fi
|
||||
fi
|
||||
if test "x$CONFIGURE_COMMAND_LINE" != x; then
|
||||
printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
|
||||
else
|
||||
@ -178,8 +210,9 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||
printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n"
|
||||
printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
|
||||
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
|
||||
printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
|
||||
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
|
||||
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
@ -212,10 +245,16 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$IS_RECONFIGURE" = "xyes"; then
|
||||
if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
|
||||
printf "WARNING: The result of this configuration has overridden an older\n"
|
||||
printf "configuration. You *should* run 'make clean' to make sure you get a\n"
|
||||
printf "proper build. Failure to do so might result in strange build problems.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
|
||||
printf "WARNING: The result of this configuration was not saved.\n"
|
||||
printf "You should run without '--no-create | -n' to create the configuration.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
])
|
||||
|
@ -102,6 +102,8 @@ HOTSPOT_BUILD_JOBS:=$(JOBS)
|
||||
# Control wether Hotspot runs Queens test after building
|
||||
TEST_IN_BUILD=@TEST_IN_BUILD@
|
||||
|
||||
USE_CLANG := @USE_CLANG@
|
||||
|
||||
# For hotspot, override compiler/tools definition to not include FIXPATH prefix.
|
||||
# Hotspot has its own handling on the Windows path situation.
|
||||
CXX:=@CCACHE@ @HOTSPOT_CXX@
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -332,6 +332,10 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
|
||||
fi
|
||||
|
||||
AC_SUBST(SET_OPENJDK)
|
||||
|
||||
# custom-make-dir is deprecated. Please use your custom-hook.m4 to override
|
||||
# the IncludeCustomExtension macro.
|
||||
BASIC_DEPRECATED_ARG_WITH(custom-make-dir)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
@ -424,6 +428,19 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
AC_SUBST(ENABLE_INTREE_EC)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# --enable-rmiconnector-iiop
|
||||
#
|
||||
AC_ARG_ENABLE(rmiconnector-iiop, [AS_HELP_STRING([--enable-rmiconnector-iiop],
|
||||
[enable the JMX RMIConnector iiop transport @<:@disabled@:>@])])
|
||||
if test "x$enable_rmiconnector_iiop" = "xyes"; then
|
||||
RMICONNECTOR_IIOP=true
|
||||
else
|
||||
RMICONNECTOR_IIOP=false
|
||||
fi
|
||||
AC_SUBST(RMICONNECTOR_IIOP)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Compress jars
|
||||
@ -469,7 +486,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
|
||||
[Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])])
|
||||
[Add a custom string to the version string if build number is not set.@<:@username_builddateb00@:>@])])
|
||||
if test "x$with_user_release_suffix" = xyes; then
|
||||
AC_MSG_ERROR([Release suffix must have a value])
|
||||
elif test "x$with_user_release_suffix" != x; then
|
||||
@ -589,14 +606,4 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
|
||||
AC_SUBST(ENABLE_DEBUG_SYMBOLS)
|
||||
AC_SUBST(ZIP_DEBUGINFO_FILES)
|
||||
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
|
||||
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
|
||||
])
|
||||
|
||||
# Support for customization of the build process. Some build files
|
||||
# will include counterparts from this location, if they exist. This allows
|
||||
# for a degree of customization of the build targets and the rules/recipes
|
||||
# to create them
|
||||
AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
|
||||
[use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
|
||||
AC_SUBST(CUSTOM_MAKE_DIR)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -562,7 +562,7 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
|
||||
fi
|
||||
|
||||
if test "x${with_alsa}" != x; then
|
||||
ALSA_LIBS="-L${with_alsa}/lib -lalsa"
|
||||
ALSA_LIBS="-L${with_alsa}/lib -lasound"
|
||||
ALSA_CFLAGS="-I${with_alsa}/include"
|
||||
ALSA_FOUND=yes
|
||||
fi
|
||||
@ -571,7 +571,7 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
|
||||
ALSA_FOUND=yes
|
||||
fi
|
||||
if test "x${with_alsa_lib}" != x; then
|
||||
ALSA_LIBS="-L${with_alsa_lib} -lalsa"
|
||||
ALSA_LIBS="-L${with_alsa_lib} -lasound"
|
||||
ALSA_FOUND=yes
|
||||
fi
|
||||
if test "x$ALSA_FOUND" = xno; then
|
||||
@ -876,14 +876,25 @@ AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
|
||||
fi
|
||||
|
||||
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
|
||||
LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
|
||||
fi
|
||||
|
||||
# TODO better (platform agnostic) test
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
LIBCXX="-lstdc++"
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBCXX)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_ON_WINDOWS],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
TOOLCHAIN_SETUP_MSVCR_DLL
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk])
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
|
||||
fi
|
||||
AC_SUBST(MSVCR_DLL)
|
||||
])
|
||||
|
@ -48,6 +48,9 @@ define NEWLINE
|
||||
|
||||
endef
|
||||
|
||||
# The command line given to configure.
|
||||
CONFIGURE_COMMAND_LINE:=@CONFIGURE_COMMAND_LINE@
|
||||
|
||||
# A self-referential reference to this file.
|
||||
SPEC:=@SPEC@
|
||||
|
||||
@ -67,8 +70,8 @@ ifeq (,$(findstring -R,$(MAKE)))
|
||||
endif
|
||||
|
||||
# Specify where the common include directory for makefiles is.
|
||||
ifeq (,$(findstring -I @SRC_ROOT@/make/common,$(MAKE)))
|
||||
MAKE:=$(MAKE) -I @SRC_ROOT@/make/common
|
||||
ifeq (,$(findstring -I @TOPDIR@/make/common,$(MAKE)))
|
||||
MAKE:=$(MAKE) -I @TOPDIR@/make/common
|
||||
endif
|
||||
|
||||
# The "human readable" name of this configuration
|
||||
@ -133,10 +136,13 @@ endif
|
||||
SYS_ROOT:=@SYS_ROOT@
|
||||
|
||||
# Paths to the source code
|
||||
SRC_ROOT:=@SRC_ROOT@
|
||||
ADD_SRC_ROOT:=@ADD_SRC_ROOT@
|
||||
OVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@
|
||||
TOPDIR:=@SRC_ROOT@
|
||||
|
||||
# The top-level directory of the forest (SRC_ROOT is a traditional alias)
|
||||
TOPDIR:=@TOPDIR@
|
||||
SRC_ROOT:=@TOPDIR@
|
||||
|
||||
OUTPUT_ROOT:=@OUTPUT_ROOT@
|
||||
JDK_TOPDIR:=@JDK_TOPDIR@
|
||||
LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
|
||||
@ -147,9 +153,6 @@ HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
|
||||
NASHORN_TOPDIR:=@NASHORN_TOPDIR@
|
||||
COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
|
||||
|
||||
# Location where build customization files may be found
|
||||
CUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@
|
||||
|
||||
# Information gathered from the version.numbers file.
|
||||
JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
|
||||
JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
|
||||
@ -172,7 +175,7 @@ RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
|
||||
COOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
|
||||
# These variables need to be generated here so that MILESTONE and
|
||||
# JDK_BUILD_NUMBER can be overridden on the make command line.
|
||||
ifeq ($(MILESTONE),)
|
||||
ifeq ($(MILESTONE), fcs)
|
||||
RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
|
||||
else
|
||||
RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
|
||||
@ -286,6 +289,9 @@ CACERTS_FILE=@CACERTS_FILE@
|
||||
# Enable unlimited crypto policy
|
||||
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
|
||||
|
||||
# Enable RMIConnector IIOP transport
|
||||
RMICONNECTOR_IIOP=@RMICONNECTOR_IIOP@
|
||||
|
||||
# Necessary additional compiler flags to compile X11
|
||||
X_CFLAGS:=@X_CFLAGS@
|
||||
X_LIBS:=@X_LIBS@
|
||||
@ -294,11 +300,8 @@ OPENWIN_HOME:=@OPENWIN_HOME@
|
||||
# The lowest required version of macosx to enforce compatiblity for
|
||||
MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
|
||||
|
||||
# There are two types: CC or CL
|
||||
# CC is gcc and others behaving reasonably similar.
|
||||
# CL is cl.exe only.
|
||||
COMPILER_TYPE:=@COMPILER_TYPE@
|
||||
COMPILER_NAME:=@COMPILER_NAME@
|
||||
# Toolchain type: gcc, clang, solstudio, lxc, microsoft...
|
||||
TOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@
|
||||
|
||||
# Option used to tell the compiler whether to create 32- or 64-bit executables
|
||||
COMPILER_TARGET_BITS_FLAG:=@COMPILER_TARGET_BITS_FLAG@
|
||||
@ -438,7 +441,7 @@ OBJ_SUFFIX:=@OBJ_SUFFIX@
|
||||
POST_STRIP_CMD:=@POST_STRIP_CMD@
|
||||
POST_MCS_CMD:=@POST_MCS_CMD@
|
||||
|
||||
JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
|
||||
JAVA_FLAGS:=@JAVA_FLAGS@
|
||||
|
||||
JAVA=@FIXPATH@ @JAVA@ $(JAVA_FLAGS)
|
||||
|
||||
@ -674,5 +677,14 @@ JRE_BUNDLE_SUBDIR=j2re-bundle/jre$(JDK_VERSION).jre/Contents
|
||||
JDK_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
|
||||
JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
|
||||
|
||||
# This macro is called to allow inclusion of closed source counterparts.
|
||||
# Unless overridden in closed sources, it expands to nothing.
|
||||
# Usage: This function is called in an open makefile, with the following
|
||||
# arguments:
|
||||
# $1 the name of the repo, or empty if the top-level repo.
|
||||
# $2 the name of the makefile
|
||||
define IncludeCustomExtension
|
||||
endef
|
||||
|
||||
# Include the custom-spec.gmk file if it exists
|
||||
-include $(dir @SPEC@)/custom-spec.gmk
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -88,7 +88,7 @@ if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
|
||||
fi
|
||||
done
|
||||
if [ "${pull_extra_base}" != "" ] ; then
|
||||
subrepos_extra="jdk/src/closed jdk/make/closed jdk/test/closed hotspot/make/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs"
|
||||
subrepos_extra="closed jdk/src/closed jdk/make/closed jdk/test/closed hotspot/make/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs"
|
||||
pull_default_tail=`echo ${pull_default} | sed -e 's@^.*://[^/]*/\(.*\)@\1@'`
|
||||
pull_extra="${pull_extra_base}/${pull_default_tail}"
|
||||
for i in ${subrepos_extra} ; do
|
||||
|
9
configure
vendored
9
configure
vendored
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,5 +25,10 @@
|
||||
# This is a thin wrapper which will call the real configure script, and
|
||||
# make sure that is called using bash.
|
||||
|
||||
# Get an absolute path to this script, since that determines the top-level directory.
|
||||
this_script_dir=`dirname $0`
|
||||
bash $this_script_dir/common/autoconf/configure "$@"
|
||||
this_script_dir=`cd $this_script_dir > /dev/null && pwd`
|
||||
|
||||
# Delegate to wrapper, forcing wrapper to believe $0 is this script by using -c.
|
||||
# This trick is needed to get autoconf to co-operate properly.
|
||||
bash -c ". $this_script_dir/common/autoconf/configure" $this_script_dir/configure CHECKME $this_script_dir "$@"
|
||||
|
@ -405,3 +405,4 @@ fca262db9c4309f99d2f5542ab0780e45c2f1578 jdk8-b120
|
||||
ce2d7e46f3c7e41241f3b407705a4071323a11ab jdk9-b00
|
||||
050a626a88951140df874f7b163e304d07b6c296 jdk9-b01
|
||||
b188446de75bda5fc52d102cddf242c3ef5ecbdf jdk9-b02
|
||||
b2fee789d23f3cdabb3db4e51af43038e5692d3a jdk9-b03
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -80,7 +80,7 @@ combination of ptrace and /proc calls.
|
||||
*************************************************************************************/
|
||||
|
||||
|
||||
#if defined(sparc) || defined(sparcv9)
|
||||
#if defined(sparc) || defined(sparcv9) || defined(ppc64)
|
||||
#define user_regs_struct pt_regs
|
||||
#endif
|
||||
|
||||
|
@ -29,54 +29,51 @@
|
||||
#include <thread_db.h>
|
||||
#include "libproc_impl.h"
|
||||
|
||||
static const char* alt_root = NULL;
|
||||
static int alt_root_len = -1;
|
||||
|
||||
#define SA_ALTROOT "SA_ALTROOT"
|
||||
|
||||
static void init_alt_root() {
|
||||
if (alt_root_len == -1) {
|
||||
alt_root = getenv(SA_ALTROOT);
|
||||
if (alt_root) {
|
||||
alt_root_len = strlen(alt_root);
|
||||
} else {
|
||||
alt_root_len = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int pathmap_open(const char* name) {
|
||||
int fd;
|
||||
char alt_path[PATH_MAX + 1];
|
||||
static const char *alt_root = NULL;
|
||||
static int alt_root_initialized = 0;
|
||||
|
||||
init_alt_root();
|
||||
int fd;
|
||||
char alt_path[PATH_MAX + 1], *alt_path_end;
|
||||
const char *s;
|
||||
|
||||
if (alt_root_len > 0) {
|
||||
strcpy(alt_path, alt_root);
|
||||
strcat(alt_path, name);
|
||||
fd = open(alt_path, O_RDONLY);
|
||||
if (fd >= 0) {
|
||||
print_debug("path %s substituted for %s\n", alt_path, name);
|
||||
return fd;
|
||||
}
|
||||
if (!alt_root_initialized) {
|
||||
alt_root_initialized = -1;
|
||||
alt_root = getenv(SA_ALTROOT);
|
||||
}
|
||||
|
||||
if (strrchr(name, '/')) {
|
||||
strcpy(alt_path, alt_root);
|
||||
strcat(alt_path, strrchr(name, '/'));
|
||||
fd = open(alt_path, O_RDONLY);
|
||||
if (fd >= 0) {
|
||||
print_debug("path %s substituted for %s\n", alt_path, name);
|
||||
return fd;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fd = open(name, O_RDONLY);
|
||||
if (fd >= 0) {
|
||||
return fd;
|
||||
}
|
||||
}
|
||||
if (alt_root == NULL) {
|
||||
return open(name, O_RDONLY);
|
||||
}
|
||||
|
||||
return -1;
|
||||
strcpy(alt_path, alt_root);
|
||||
alt_path_end = alt_path + strlen(alt_path);
|
||||
|
||||
// Strip path items one by one and try to open file with alt_root prepended
|
||||
s = name;
|
||||
while (1) {
|
||||
strcat(alt_path, s);
|
||||
s += 1;
|
||||
|
||||
fd = open(alt_path, O_RDONLY);
|
||||
if (fd >= 0) {
|
||||
print_debug("path %s substituted for %s\n", alt_path, name);
|
||||
return fd;
|
||||
}
|
||||
|
||||
// Linker always put full path to solib to process, so we can rely
|
||||
// on presence of /. If slash is not present, it means, that SOlib doesn't
|
||||
// physically exist (e.g. linux-gate.so) and we fail opening it anyway
|
||||
if ((s = strchr(s, '/')) == NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
*alt_path_end = 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static bool _libsaproc_debug;
|
||||
|
@ -55,31 +55,21 @@ class LinuxCDebugger implements CDebugger {
|
||||
if (pc == null) {
|
||||
return null;
|
||||
}
|
||||
List objs = getLoadObjectList();
|
||||
Object[] arr = objs.toArray();
|
||||
// load objects are sorted by base address, do binary search
|
||||
int mid = -1;
|
||||
int low = 0;
|
||||
int high = arr.length - 1;
|
||||
|
||||
while (low <= high) {
|
||||
mid = (low + high) >> 1;
|
||||
LoadObject midVal = (LoadObject) arr[mid];
|
||||
long cmp = pc.minus(midVal.getBase());
|
||||
if (cmp < 0) {
|
||||
high = mid - 1;
|
||||
} else if (cmp > 0) {
|
||||
long size = midVal.getSize();
|
||||
if (cmp >= size) {
|
||||
low = mid + 1;
|
||||
} else {
|
||||
return (LoadObject) arr[mid];
|
||||
}
|
||||
} else { // match found
|
||||
return (LoadObject) arr[mid];
|
||||
}
|
||||
/* Typically we have about ten loaded objects here. So no reason to do
|
||||
sort/binary search here. Linear search gives us acceptable performance.*/
|
||||
|
||||
List objs = getLoadObjectList();
|
||||
|
||||
for (int i = 0; i < objs.size(); i++) {
|
||||
LoadObject ob = (LoadObject) objs.get(i);
|
||||
Address base = ob.getBase();
|
||||
long size = ob.getSize();
|
||||
if ( pc.greaterThanOrEqual(base) && pc.lessThan(base.addOffsetTo(size))) {
|
||||
return ob;
|
||||
}
|
||||
}
|
||||
// no match found.
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* @(#)AdaptiveFreeList.java
|
||||
*
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.memory;
|
||||
|
||||
import java.util.Observable;
|
||||
import java.util.Observer;
|
||||
|
||||
import sun.jvm.hotspot.debugger.Address;
|
||||
import sun.jvm.hotspot.runtime.VM;
|
||||
import sun.jvm.hotspot.runtime.VMObject;
|
||||
import sun.jvm.hotspot.types.CIntegerField;
|
||||
import sun.jvm.hotspot.types.Type;
|
||||
import sun.jvm.hotspot.types.TypeDataBase;
|
||||
|
||||
public class AdaptiveFreeList extends VMObject {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static synchronized void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("AdaptiveFreeList<FreeChunk>");
|
||||
sizeField = type.getCIntegerField("_size");
|
||||
countField = type.getCIntegerField("_count");
|
||||
headerSize = type.getSize();
|
||||
}
|
||||
|
||||
// Fields
|
||||
private static CIntegerField sizeField;
|
||||
private static CIntegerField countField;
|
||||
private static long headerSize;
|
||||
|
||||
//Constructor
|
||||
public AdaptiveFreeList(Address address) {
|
||||
super(address);
|
||||
}
|
||||
|
||||
// Accessors
|
||||
public long size() {
|
||||
return sizeField.getValue(addr);
|
||||
}
|
||||
|
||||
public long count() {
|
||||
return countField.getValue(addr);
|
||||
}
|
||||
|
||||
public static long sizeOf() {
|
||||
return headerSize;
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,25 +24,29 @@
|
||||
|
||||
package sun.jvm.hotspot.memory;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
import java.io.PrintStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Observable;
|
||||
import java.util.Observer;
|
||||
|
||||
import sun.jvm.hotspot.debugger.Address;
|
||||
import sun.jvm.hotspot.debugger.Debugger;
|
||||
import sun.jvm.hotspot.oops.ObjectHeap;
|
||||
import sun.jvm.hotspot.oops.Oop;
|
||||
import sun.jvm.hotspot.runtime.VM;
|
||||
import sun.jvm.hotspot.runtime.VMObjectFactory;
|
||||
import sun.jvm.hotspot.types.AddressField;
|
||||
import sun.jvm.hotspot.types.Type;
|
||||
import sun.jvm.hotspot.types.TypeDataBase;
|
||||
import sun.jvm.hotspot.utilities.Assert;
|
||||
|
||||
public class CompactibleFreeListSpace extends CompactibleSpace {
|
||||
private static AddressField collectorField;
|
||||
|
||||
// for free size, three fields
|
||||
// FreeBlockDictionary* _dictionary; // ptr to dictionary for large size blocks
|
||||
// FreeList _indexedFreeList[IndexSetSize]; // indexed array for small size blocks
|
||||
// LinearAllocBlock _smallLinearAllocBlock; // small linear alloc in TLAB
|
||||
private static AddressField indexedFreeListField;
|
||||
private static AddressField dictionaryField;
|
||||
private static long smallLinearAllocBlockFieldOffset;
|
||||
private static long indexedFreeListSizeOf;
|
||||
|
||||
private int heapWordSize; // 4 for 32bit, 8 for 64 bits
|
||||
private int IndexSetStart; // for small indexed list
|
||||
@ -109,11 +113,11 @@ public class CompactibleFreeListSpace extends CompactibleSpace {
|
||||
// small chunks
|
||||
long size = 0;
|
||||
Address cur = addr.addOffsetTo( indexedFreeListField.getOffset() );
|
||||
cur = cur.addOffsetTo(IndexSetStart*FreeList.sizeOf());
|
||||
cur = cur.addOffsetTo(IndexSetStart*AdaptiveFreeList.sizeOf());
|
||||
for (int i=IndexSetStart; i<IndexSetSize; i += IndexSetStride) {
|
||||
FreeList freeList = (FreeList) VMObjectFactory.newObject(FreeList.class, cur);
|
||||
AdaptiveFreeList freeList = (AdaptiveFreeList) VMObjectFactory.newObject(AdaptiveFreeList.class, cur);
|
||||
size += i*freeList.count();
|
||||
cur= cur.addOffsetTo(IndexSetStride*FreeList.sizeOf());
|
||||
cur= cur.addOffsetTo(IndexSetStride*AdaptiveFreeList.sizeOf());
|
||||
}
|
||||
|
||||
// large block
|
||||
|
@ -1,72 +0,0 @@
|
||||
/*
|
||||
* @(#)FreeList.java
|
||||
*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.memory;
|
||||
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
|
||||
public class FreeList extends VMObject {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
initialize(VM.getVM().getTypeDataBase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static synchronized void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("FreeList<FreeChunk>");
|
||||
sizeField = type.getCIntegerField("_size");
|
||||
countField = type.getCIntegerField("_count");
|
||||
headerSize = type.getSize();
|
||||
}
|
||||
|
||||
// Fields
|
||||
private static CIntegerField sizeField;
|
||||
private static CIntegerField countField;
|
||||
private static long headerSize;
|
||||
|
||||
//Constructor
|
||||
public FreeList(Address address) {
|
||||
super(address);
|
||||
}
|
||||
|
||||
// Accessors
|
||||
public long size() {
|
||||
return sizeField.getValue(addr);
|
||||
}
|
||||
|
||||
public long count() {
|
||||
return countField.getValue(addr);
|
||||
}
|
||||
|
||||
public static long sizeOf() {
|
||||
return headerSize;
|
||||
}
|
||||
}
|
@ -48,7 +48,7 @@ public class Block extends VMObject {
|
||||
preOrderField = new CIntField(type.getCIntegerField("_pre_order"), 0);
|
||||
domDepthField = new CIntField(type.getCIntegerField("_dom_depth"), 0);
|
||||
idomField = type.getAddressField("_idom");
|
||||
freqField = type.getJFloatField("_freq");
|
||||
freqField = type.getJDoubleField("_freq");
|
||||
}
|
||||
|
||||
private static AddressField nodesField;
|
||||
@ -57,7 +57,7 @@ public class Block extends VMObject {
|
||||
private static CIntField preOrderField;
|
||||
private static CIntField domDepthField;
|
||||
private static AddressField idomField;
|
||||
private static JFloatField freqField;
|
||||
private static JDoubleField freqField;
|
||||
|
||||
public Block(Address addr) {
|
||||
super(addr);
|
||||
@ -67,8 +67,8 @@ public class Block extends VMObject {
|
||||
return (int)preOrderField.getValue(getAddress());
|
||||
}
|
||||
|
||||
public float freq() {
|
||||
return (float)freqField.getValue(getAddress());
|
||||
public double freq() {
|
||||
return (double)freqField.getValue(getAddress());
|
||||
}
|
||||
|
||||
public Node_List nodes() {
|
||||
|
@ -103,11 +103,12 @@ public class ClassLoaderStats extends Tool {
|
||||
}
|
||||
|
||||
SystemDictionary dict = VM.getVM().getSystemDictionary();
|
||||
dict.classesDo(new SystemDictionary.ClassAndLoaderVisitor() {
|
||||
public void visit(Klass k, Oop loader) {
|
||||
dict.classesDo(new SystemDictionary.ClassVisitor() {
|
||||
public void visit(Klass k) {
|
||||
if (! (k instanceof InstanceKlass)) {
|
||||
return;
|
||||
}
|
||||
Oop loader = ((InstanceKlass) k).getClassLoader();
|
||||
LoaderData ld = (loader != null) ? (LoaderData)loaderMap.get(loader)
|
||||
: bootstrapLoaderData;
|
||||
if (ld != null) {
|
||||
|
@ -371,19 +371,23 @@ function sym2addr(dso, sym) {
|
||||
return sa.dbg.lookup(dso, sym);
|
||||
}
|
||||
|
||||
// returns the ClosestSymbol or null
|
||||
function closestSymbolFor(addr) {
|
||||
if (sa.cdbg == null) {
|
||||
function loadObjectContainingPC(addr) {
|
||||
if (sa.cdbg == null) {
|
||||
// no CDebugger support, return null
|
||||
return null;
|
||||
} else {
|
||||
var dso = sa.cdbg.loadObjectContainingPC(addr);
|
||||
if (dso != null) {
|
||||
return dso.closestSymbolToPC(addr);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sa.cdbg.loadObjectContainingPC(addr);
|
||||
}
|
||||
|
||||
// returns the ClosestSymbol or null
|
||||
function closestSymbolFor(addr) {
|
||||
var dso = loadObjectContainingPC(addr);
|
||||
if (dso != null) {
|
||||
return dso.closestSymbolToPC(addr);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// Address-to-symbol
|
||||
@ -804,6 +808,16 @@ delete tmp;
|
||||
// VM type to SA class map
|
||||
var vmType2Class = new Object();
|
||||
|
||||
// C2 only classes
|
||||
try{
|
||||
vmType2Class["ExceptionBlob"] = sapkg.code.ExceptionBlob;
|
||||
vmType2Class["UncommonTrapBlob"] = sapkg.code.UncommonTrapBlob;
|
||||
} catch(e) {
|
||||
// Ignore exception. C2 specific objects might be not
|
||||
// available in client VM
|
||||
}
|
||||
|
||||
|
||||
// This is *not* exhaustive. Add more if needed.
|
||||
// code blobs
|
||||
vmType2Class["BufferBlob"] = sapkg.code.BufferBlob;
|
||||
@ -812,10 +826,8 @@ vmType2Class["RuntimeStub"] = sapkg.code.RuntimeStub;
|
||||
vmType2Class["SafepointBlob"] = sapkg.code.SafepointBlob;
|
||||
vmType2Class["C2IAdapter"] = sapkg.code.C2IAdapter;
|
||||
vmType2Class["DeoptimizationBlob"] = sapkg.code.DeoptimizationBlob;
|
||||
vmType2Class["ExceptionBlob"] = sapkg.code.ExceptionBlob;
|
||||
vmType2Class["I2CAdapter"] = sapkg.code.I2CAdapter;
|
||||
vmType2Class["OSRAdapter"] = sapkg.code.OSRAdapter;
|
||||
vmType2Class["UncommonTrapBlob"] = sapkg.code.UncommonTrapBlob;
|
||||
vmType2Class["PCDesc"] = sapkg.code.PCDesc;
|
||||
|
||||
// interpreter
|
||||
@ -876,21 +888,29 @@ function isOop(addr) {
|
||||
|
||||
// returns description of given pointer as a String
|
||||
function whatis(addr) {
|
||||
addr = any2addr(addr);
|
||||
var ptrLoc = findPtr(addr);
|
||||
if (ptrLoc.isUnknown()) {
|
||||
var vmType = vmTypeof(addr);
|
||||
if (vmType != null) {
|
||||
return "pointer to " + vmType.name;
|
||||
} else {
|
||||
var sym = closestSymbolFor(addr);
|
||||
if (sym != null) {
|
||||
return sym.name + '+' + sym.offset;
|
||||
} else {
|
||||
return ptrLoc.toString();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return ptrLoc.toString();
|
||||
}
|
||||
addr = any2addr(addr);
|
||||
var ptrLoc = findPtr(addr);
|
||||
if (!ptrLoc.isUnknown()) {
|
||||
return ptrLoc.toString();
|
||||
}
|
||||
|
||||
var vmType = vmTypeof(addr);
|
||||
if (vmType != null) {
|
||||
return "pointer to " + vmType.name;
|
||||
}
|
||||
|
||||
var dso = loadObjectContainingPC(addr);
|
||||
if (dso == null) {
|
||||
return ptrLoc.toString();
|
||||
}
|
||||
|
||||
var sym = dso.closestSymbolToPC(addr);
|
||||
if (sym != null) {
|
||||
return sym.name + '+' + sym.offset;
|
||||
}
|
||||
|
||||
var s = dso.getName();
|
||||
var p = s.lastIndexOf("/");
|
||||
var base = dso.getBase();
|
||||
return s.substring(p+1, s.length) + '+' + addr.minus(base);
|
||||
}
|
||||
|
@ -87,6 +87,7 @@ endif
|
||||
# Typical C1/C2 targets made available with this Makefile
|
||||
C1_VM_TARGETS=product1 fastdebug1 optimized1 debug1
|
||||
C2_VM_TARGETS=product fastdebug optimized debug
|
||||
CORE_VM_TARGETS=productcore fastdebugcore optimizedcore debugcore
|
||||
ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero debugzero
|
||||
SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark debugshark
|
||||
MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 debugminimal1
|
||||
@ -136,6 +137,12 @@ all_fastdebugshark: fastdebugshark docs export_fastdebug
|
||||
all_debugshark: debugshark docs export_debug
|
||||
all_optimizedshark: optimizedshark docs export_optimized
|
||||
|
||||
allcore: all_productcore all_fastdebugcore
|
||||
all_productcore: productcore docs export_product
|
||||
all_fastdebugcore: fastdebugcore docs export_fastdebug
|
||||
all_debugcore: debugcore docs export_debug
|
||||
all_optimizedcore: optimizedcore docs export_optimized
|
||||
|
||||
# Do everything
|
||||
world: all create_jdk
|
||||
|
||||
@ -154,6 +161,7 @@ endif
|
||||
# Output directories
|
||||
C1_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1
|
||||
C2_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2
|
||||
CORE_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_core
|
||||
MINIMAL1_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1
|
||||
ZERO_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_zero
|
||||
SHARK_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_shark
|
||||
@ -167,6 +175,10 @@ $(C2_VM_TARGETS):
|
||||
$(CD) $(GAMMADIR)/make; \
|
||||
$(MAKE) BUILD_DIR=$(C2_DIR) BUILD_FLAVOR=$@ VM_TARGET=$@ generic_build2 $(ALT_OUT)
|
||||
|
||||
$(CORE_VM_TARGETS):
|
||||
$(CD) $(GAMMADIR)/make; \
|
||||
$(MAKE) BUILD_DIR=$(CORE_DIR) BUILD_FLAVOR=$(@:%core=%) VM_TARGET=$@ generic_buildcore $(ALT_OUT)
|
||||
|
||||
$(ZERO_VM_TARGETS):
|
||||
$(CD) $(GAMMADIR)/make; \
|
||||
$(MAKE) BUILD_DIR=$(ZERO_DIR) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ generic_buildzero $(ALT_OUT)
|
||||
@ -228,6 +240,20 @@ else
|
||||
$(MAKE_ARGS) $(VM_TARGET)
|
||||
endif
|
||||
|
||||
generic_buildcore: $(HOTSPOT_SCRIPT)
|
||||
ifeq ($(HS_ARCH),ppc)
|
||||
ifeq ($(ARCH_DATA_MODEL),64)
|
||||
$(MKDIR) -p $(OUTPUTDIR)
|
||||
$(CD) $(OUTPUTDIR); \
|
||||
$(MAKE) -f $(ABS_OS_MAKEFILE) \
|
||||
$(MAKE_ARGS) $(VM_TARGET)
|
||||
else
|
||||
@$(ECHO) "No ($(VM_TARGET)) for ppc ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
|
||||
endif
|
||||
else
|
||||
@$(ECHO) "No ($(VM_TARGET)) for $(HS_ARCH)"
|
||||
endif
|
||||
|
||||
generic_buildzero: $(HOTSPOT_SCRIPT)
|
||||
$(MKDIR) -p $(OUTPUTDIR)
|
||||
$(CD) $(OUTPUTDIR); \
|
||||
@ -287,6 +313,7 @@ XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt
|
||||
DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs
|
||||
C1_BUILD_DIR =$(C1_DIR)/$(BUILD_FLAVOR)
|
||||
C2_BUILD_DIR =$(C2_DIR)/$(BUILD_FLAVOR)
|
||||
CORE_BUILD_DIR =$(CORE_DIR)/$(BUILD_FLAVOR)
|
||||
MINIMAL1_BUILD_DIR=$(MINIMAL1_DIR)/$(BUILD_FLAVOR)
|
||||
ZERO_BUILD_DIR =$(ZERO_DIR)/$(BUILD_FLAVOR)
|
||||
SHARK_BUILD_DIR =$(SHARK_DIR)/$(BUILD_FLAVOR)
|
||||
@ -464,6 +491,28 @@ $(EXPORT_SERVER_DIR)/%.dSYM: $(ZERO_BUILD_DIR)/%.dSYM
|
||||
$(install-dir)
|
||||
endif
|
||||
|
||||
# Core
|
||||
ifeq ($(JVM_VARIANT_CORE), true)
|
||||
# Common
|
||||
$(EXPORT_LIB_DIR)/%.jar: $(CORE_BUILD_DIR)/../generated/%.jar
|
||||
$(install-file)
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(CORE_BUILD_DIR)/../generated/jvmtifiles/%
|
||||
$(install-file)
|
||||
# Unix
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(CORE_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(CORE_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(CORE_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(CORE_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.debuginfo: $(CORE_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.diz: $(CORE_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
endif
|
||||
|
||||
# Shark
|
||||
ifeq ($(JVM_VARIANT_ZEROSHARK), true)
|
||||
# Common
|
||||
@ -531,6 +580,7 @@ clobber clean: clean_build clean_export clean_jdk
|
||||
clean_build:
|
||||
$(RM) -r $(C1_DIR)
|
||||
$(RM) -r $(C2_DIR)
|
||||
$(RM) -r $(CORE_DIR)
|
||||
$(RM) -r $(ZERO_DIR)
|
||||
$(RM) -r $(SHARK_DIR)
|
||||
$(RM) -r $(MINIMAL1_DIR)
|
||||
@ -557,11 +607,11 @@ $(JDK_IMAGE_DIR)/jre/lib/rt.jar:
|
||||
|
||||
|
||||
# Testing the built JVM
|
||||
RUN_JVM=JAVA_HOME=$(JDK_IMPORT_PATH) $(JDK_IMPORT_PATH)/bin/java -d$(ARCH_DATA_MODEL) -Dsun.java.launcher=gamma
|
||||
RUN_JVM=JAVA_HOME=$(JDK_IMPORT_PATH) $(JDK_IMPORT_PATH)/bin/java -d$(ARCH_DATA_MODEL) -XXaltjvm=$(ALTJVM_DIR) -Dsun.java.launcher.is_altjvm=true
|
||||
generic_test:
|
||||
@$(ECHO) "Running with: $(ALTJVM_DIR)"
|
||||
@$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -Xinternalversion
|
||||
@$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -showversion -help
|
||||
@$(RUN_JVM) -Xinternalversion
|
||||
@$(RUN_JVM) -showversion -help
|
||||
|
||||
# C2 test targets
|
||||
test_product test_optimized test_fastdebug test_debug:
|
||||
|
377
hotspot/make/aix/Makefile
Normal file
377
hotspot/make/aix/Makefile
Normal file
@ -0,0 +1,377 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# This makefile creates a build tree and lights off a build.
|
||||
# You can go back into the build tree and perform rebuilds or
|
||||
# incremental builds as desired. Be sure to reestablish
|
||||
# environment variable settings for LD_LIBRARY_PATH and JAVA_HOME.
|
||||
|
||||
# The make process now relies on java and javac. These can be
|
||||
# specified either implicitly on the PATH, by setting the
|
||||
# (JDK-inherited) ALT_BOOTDIR environment variable to full path to a
|
||||
# JDK in which bin/java and bin/javac are present and working (e.g.,
|
||||
# /usr/local/java/jdk1.3/solaris), or via the (JDK-inherited)
|
||||
# default BOOTDIR path value. Note that one of ALT_BOOTDIR
|
||||
# or BOOTDIR has to be set. We do *not* search javac, javah, rmic etc.
|
||||
# from the PATH.
|
||||
#
|
||||
# One can set ALT_BOOTDIR or BOOTDIR to point to a jdk that runs on
|
||||
# an architecture that differs from the target architecture, as long
|
||||
# as the bootstrap jdk runs under the same flavor of OS as the target
|
||||
# (i.e., if the target is linux, point to a jdk that runs on a linux
|
||||
# box). In order to use such a bootstrap jdk, set the make variable
|
||||
# REMOTE to the desired remote command mechanism, e.g.,
|
||||
#
|
||||
# make REMOTE="rsh -l me myotherlinuxbox"
|
||||
|
||||
# Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
|
||||
# JDI binding on SA produces two binaries:
|
||||
# 1. sa-jdi.jar - This is built before building libjvm.so
|
||||
# Please refer to ./makefiles/sa.make
|
||||
# 2. libsa.so - Native library for SA - This is built after
|
||||
# libjsig.so (signal interposition library)
|
||||
# Please refer to ./makefiles/vm.make
|
||||
# If $(GAMMADIR)/agent dir is not present, SA components are not built.
|
||||
|
||||
# No tests on Aix.
|
||||
TEST_IN_BUILD=false
|
||||
|
||||
ifeq ($(GAMMADIR),)
|
||||
include ../../make/defs.make
|
||||
else
|
||||
include $(GAMMADIR)/make/defs.make
|
||||
endif
|
||||
include $(GAMMADIR)/make/$(OSNAME)/makefiles/rules.make
|
||||
|
||||
ifndef CC_INTERP
|
||||
ifndef FORCE_TIERED
|
||||
FORCE_TIERED=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef LP64
|
||||
ifeq ("$(filter $(LP64_ARCH),$(BUILDARCH))","")
|
||||
_JUNK_ := $(shell echo >&2 \
|
||||
$(OSNAME) $(ARCH) "*** ERROR: this platform does not support 64-bit compilers!")
|
||||
@exit 1
|
||||
endif
|
||||
endif
|
||||
|
||||
# we need to set up LP64 correctly to satisfy sanity checks in adlc
|
||||
ifneq ("$(filter $(LP64_ARCH),$(BUILDARCH))","")
|
||||
MFLAGS += " LP64=1 "
|
||||
endif
|
||||
|
||||
# pass USE_SUNCC further, through MFLAGS
|
||||
ifdef USE_SUNCC
|
||||
MFLAGS += " USE_SUNCC=1 "
|
||||
endif
|
||||
|
||||
# The following renders pathnames in generated Makefiles valid on
|
||||
# machines other than the machine containing the build tree.
|
||||
#
|
||||
# For example, let's say my build tree lives on /files12 on
|
||||
# exact.east.sun.com. This logic will cause GAMMADIR to begin with
|
||||
# /net/exact/files12/...
|
||||
#
|
||||
# We only do this on SunOS variants, for a couple of reasons:
|
||||
# * It is extremely rare that source trees exist on other systems
|
||||
# * It has been claimed that the Linux automounter is flakey, so
|
||||
# changing GAMMADIR in a way that exercises the automounter could
|
||||
# prove to be a source of unreliability in the build process.
|
||||
# Obviously, this Makefile is only relevant on SunOS boxes to begin
|
||||
# with, but the SunOS conditionalization will make it easier to
|
||||
# combine Makefiles in the future (assuming we ever do that).
|
||||
|
||||
ifeq ($(OSNAME),solaris)
|
||||
|
||||
# prepend current directory to relative pathnames.
|
||||
NEW_GAMMADIR := \
|
||||
$(shell echo $(GAMMADIR) | \
|
||||
sed -e "s=^\([^/].*\)=$(shell pwd)/\1=" \
|
||||
)
|
||||
unexport NEW_GAMMADIR
|
||||
|
||||
# If NEW_GAMMADIR doesn't already start with "/net/":
|
||||
ifeq ($(strip $(filter /net/%,$(NEW_GAMMADIR))),)
|
||||
# prepend /net/$(HOST)
|
||||
# remove /net/$(HOST) if name already began with /home/
|
||||
# remove /net/$(HOST) if name already began with /java/
|
||||
# remove /net/$(HOST) if name already began with /lab/
|
||||
NEW_GAMMADIR := \
|
||||
$(shell echo $(NEW_GAMMADIR) | \
|
||||
sed -e "s=^\(.*\)=/net/$(HOST)\1=" \
|
||||
-e "s=^/net/$(HOST)/home/=/home/=" \
|
||||
-e "s=^/net/$(HOST)/java/=/java/=" \
|
||||
-e "s=^/net/$(HOST)/lab/=/lab/=" \
|
||||
)
|
||||
# Don't use the new value for GAMMADIR unless a file with the new
|
||||
# name actually exists.
|
||||
ifneq ($(wildcard $(NEW_GAMMADIR)),)
|
||||
GAMMADIR := $(NEW_GAMMADIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# BUILDARCH is set to "zero" for Zero builds. VARIANTARCH
|
||||
# is used to give the build directories meaningful names.
|
||||
VARIANTARCH = $(subst i386,i486,$(ZERO_LIBARCH))
|
||||
|
||||
# There is a (semi-) regular correspondence between make targets and actions:
|
||||
#
|
||||
# Target Tree Type Build Dir
|
||||
#
|
||||
# debug compiler2 <os>_<arch>_compiler2/debug
|
||||
# fastdebug compiler2 <os>_<arch>_compiler2/fastdebug
|
||||
# optimized compiler2 <os>_<arch>_compiler2/optimized
|
||||
# product compiler2 <os>_<arch>_compiler2/product
|
||||
#
|
||||
# debug1 compiler1 <os>_<arch>_compiler1/debug
|
||||
# fastdebug1 compiler1 <os>_<arch>_compiler1/fastdebug
|
||||
# optimized1 compiler1 <os>_<arch>_compiler1/optimized
|
||||
# product1 compiler1 <os>_<arch>_compiler1/product
|
||||
#
|
||||
# debugcore core <os>_<arch>_core/debug
|
||||
# fastdebugcore core <os>_<arch>_core/fastdebug
|
||||
# optimizedcore core <os>_<arch>_core/optimized
|
||||
# productcore core <os>_<arch>_core/product
|
||||
#
|
||||
# debugzero zero <os>_<arch>_zero/debug
|
||||
# fastdebugzero zero <os>_<arch>_zero/fastdebug
|
||||
# optimizedzero zero <os>_<arch>_zero/optimized
|
||||
# productzero zero <os>_<arch>_zero/product
|
||||
#
|
||||
# debugshark shark <os>_<arch>_shark/debug
|
||||
# fastdebugshark shark <os>_<arch>_shark/fastdebug
|
||||
# optimizedshark shark <os>_<arch>_shark/optimized
|
||||
# productshark shark <os>_<arch>_shark/product
|
||||
#
|
||||
# fastdebugminimal1 minimal1 <os>_<arch>_minimal1/fastdebug
|
||||
# productminimal1 minimal1 <os>_<arch>_minimal1/product
|
||||
#
|
||||
# What you get with each target:
|
||||
#
|
||||
# debug* - debug compile with asserts enabled
|
||||
# fastdebug* - optimized compile, but with asserts enabled
|
||||
# optimized* - optimized compile, no asserts
|
||||
# product* - the shippable thing: optimized compile, no asserts, -DPRODUCT
|
||||
|
||||
# This target list needs to be coordinated with the usage message
|
||||
# in the build.sh script:
|
||||
TARGETS = debug fastdebug optimized product
|
||||
|
||||
ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
|
||||
SUBDIR_DOCS = $(OSNAME)_$(VARIANTARCH)_docs
|
||||
else
|
||||
SUBDIR_DOCS = $(OSNAME)_$(BUILDARCH)_docs
|
||||
endif
|
||||
SUBDIRS_C1 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS))
|
||||
SUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
|
||||
SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
|
||||
SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
|
||||
SUBDIRS_ZERO = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS))
|
||||
SUBDIRS_SHARK = $(addprefix $(OSNAME)_$(VARIANTARCH)_shark/,$(TARGETS))
|
||||
SUBDIRS_MINIMAL1 = $(addprefix $(OSNAME)_$(BUILDARCH)_minimal1/,$(TARGETS))
|
||||
|
||||
TARGETS_C2 = $(TARGETS)
|
||||
TARGETS_C1 = $(addsuffix 1,$(TARGETS))
|
||||
TARGETS_TIERED = $(addsuffix tiered,$(TARGETS))
|
||||
TARGETS_CORE = $(addsuffix core,$(TARGETS))
|
||||
TARGETS_ZERO = $(addsuffix zero,$(TARGETS))
|
||||
TARGETS_SHARK = $(addsuffix shark,$(TARGETS))
|
||||
TARGETS_MINIMAL1 = $(addsuffix minimal1,$(TARGETS))
|
||||
|
||||
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
|
||||
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
|
||||
BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
|
||||
|
||||
BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# Could make everything by default, but that would take a while.
|
||||
all:
|
||||
@echo "Try '$(MAKE) <target> ...' where <target> is one or more of"
|
||||
@echo " $(TARGETS_C2)"
|
||||
@echo " $(TARGETS_C1)"
|
||||
@echo " $(TARGETS_CORE)"
|
||||
@echo " $(TARGETS_ZERO)"
|
||||
@echo " $(TARGETS_SHARK)"
|
||||
@echo " $(TARGETS_MINIMAL1)"
|
||||
|
||||
checks: check_os_version check_j2se_version
|
||||
|
||||
# We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
|
||||
# Solaris 2.5.1, 2.6).
|
||||
# Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.
|
||||
|
||||
SUPPORTED_OS_VERSION = AIX
|
||||
OS_VERSION := $(shell uname -a)
|
||||
EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
|
||||
|
||||
check_os_version:
|
||||
ifeq ($(DISABLE_HOTSPOT_OS_VERSION_CHECK)$(EMPTY_IF_NOT_SUPPORTED),)
|
||||
$(QUIETLY) >&2 echo "*** This OS is not supported:" `uname -a`; exit 1;
|
||||
endif
|
||||
|
||||
# jvmti.make requires XSLT (J2SE 1.4.x or newer):
|
||||
XSLT_CHECK = $(REMOTE) $(RUN.JAVAP) javax.xml.transform.TransformerFactory
|
||||
# If not found then fail fast.
|
||||
check_j2se_version:
|
||||
$(QUIETLY) $(XSLT_CHECK) > /dev/null 2>&1; \
|
||||
if [ $$? -ne 0 ]; then \
|
||||
$(REMOTE) $(RUN.JAVA) -version; \
|
||||
echo "*** An XSLT processor (J2SE 1.4.x or newer) is required" \
|
||||
"to bootstrap this build" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
$(SUBDIRS_TIERED): $(BUILDTREE_MAKE)
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=tiered
|
||||
|
||||
$(SUBDIRS_C2): $(BUILDTREE_MAKE)
|
||||
ifeq ($(FORCE_TIERED),1)
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=tiered FORCE_TIERED=1
|
||||
else
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=compiler2
|
||||
endif
|
||||
|
||||
$(SUBDIRS_C1): $(BUILDTREE_MAKE)
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=compiler1
|
||||
|
||||
$(SUBDIRS_CORE): $(BUILDTREE_MAKE)
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=core
|
||||
|
||||
$(SUBDIRS_ZERO): $(BUILDTREE_MAKE) platform_zero
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=zero VARIANTARCH=$(VARIANTARCH)
|
||||
|
||||
$(SUBDIRS_SHARK): $(BUILDTREE_MAKE) platform_zero
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=shark VARIANTARCH=$(VARIANTARCH)
|
||||
|
||||
$(SUBDIRS_MINIMAL1): $(BUILDTREE_MAKE)
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=minimal1
|
||||
|
||||
|
||||
platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in
|
||||
$(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@
|
||||
|
||||
# Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME
|
||||
|
||||
$(TARGETS_C2): $(SUBDIRS_C2)
|
||||
cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS)
|
||||
ifdef INSTALL
|
||||
cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install
|
||||
endif
|
||||
|
||||
$(TARGETS_TIERED): $(SUBDIRS_TIERED)
|
||||
cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS)
|
||||
ifdef INSTALL
|
||||
cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install
|
||||
endif
|
||||
|
||||
$(TARGETS_C1): $(SUBDIRS_C1)
|
||||
cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS)
|
||||
ifdef INSTALL
|
||||
cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install
|
||||
endif
|
||||
|
||||
$(TARGETS_CORE): $(SUBDIRS_CORE)
|
||||
cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS)
|
||||
ifdef INSTALL
|
||||
cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
|
||||
endif
|
||||
|
||||
$(TARGETS_ZERO): $(SUBDIRS_ZERO)
|
||||
cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS)
|
||||
ifdef INSTALL
|
||||
cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS) install
|
||||
endif
|
||||
|
||||
$(TARGETS_SHARK): $(SUBDIRS_SHARK)
|
||||
cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS)
|
||||
ifdef INSTALL
|
||||
cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install
|
||||
endif
|
||||
|
||||
$(TARGETS_MINIMAL1): $(SUBDIRS_MINIMAL1)
|
||||
cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS)
|
||||
ifdef INSTALL
|
||||
cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) install
|
||||
endif
|
||||
|
||||
# Just build the tree, and nothing else:
|
||||
tree: $(SUBDIRS_C2)
|
||||
tree1: $(SUBDIRS_C1)
|
||||
treecore: $(SUBDIRS_CORE)
|
||||
treezero: $(SUBDIRS_ZERO)
|
||||
treeshark: $(SUBDIRS_SHARK)
|
||||
treeminimal1: $(SUBDIRS_MINIMAL1)
|
||||
|
||||
# Doc target. This is the same for all build options.
|
||||
# Hence create a docs directory beside ...$(ARCH)_[...]
|
||||
# We specify 'BUILD_FLAVOR=product' so that the proper
|
||||
# ENABLE_FULL_DEBUG_SYMBOLS value is used.
|
||||
docs: checks
|
||||
$(QUIETLY) mkdir -p $(SUBDIR_DOCS)
|
||||
$(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) BUILD_FLAVOR=product jvmtidocs
|
||||
|
||||
# Synonyms for win32-like targets.
|
||||
compiler2: debug product
|
||||
|
||||
compiler1: debug1 product1
|
||||
|
||||
core: debugcore productcore
|
||||
|
||||
zero: debugzero productzero
|
||||
|
||||
shark: debugshark productshark
|
||||
|
||||
clean_docs:
|
||||
rm -rf $(SUBDIR_DOCS)
|
||||
|
||||
clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1:
|
||||
rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
|
||||
|
||||
clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs
|
||||
|
||||
include $(GAMMADIR)/make/cscope.make
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1)
|
||||
.PHONY: tree tree1 treecore treezero treeshark
|
||||
.PHONY: all compiler1 compiler2 core zero shark
|
||||
.PHONY: clean clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark docs clean_docs
|
||||
.PHONY: checks check_os_version check_j2se_version
|
20
hotspot/make/aix/adlc_updater
Normal file
20
hotspot/make/aix/adlc_updater
Normal file
@ -0,0 +1,20 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# This file is used by adlc.make to selectively update generated
|
||||
# adlc files. Because source and target diretories are relative
|
||||
# paths, this file is copied to the target build directory before
|
||||
# use.
|
||||
#
|
||||
# adlc-updater <file> <source-dir> <target-dir>
|
||||
#
|
||||
fix_lines() {
|
||||
# repair bare #line directives in $1 to refer to $2
|
||||
awk < $1 > $1+ '
|
||||
/^#line 999999$/ {print "#line " (NR+1) " \"" F2 "\""; next}
|
||||
{print}
|
||||
' F2=$2
|
||||
mv $1+ $1
|
||||
}
|
||||
fix_lines $2/$1 $3/$1
|
||||
[ -f $3/$1 ] && cmp -s $2/$1 $3/$1 || \
|
||||
( [ -f $3/$1 ] && echo Updating $3/$1 ; touch $2/made-change ; mv $2/$1 $3/$1 )
|
87
hotspot/make/aix/makefiles/adjust-mflags.sh
Normal file
87
hotspot/make/aix/makefiles/adjust-mflags.sh
Normal file
@ -0,0 +1,87 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# This script is used only from top.make.
|
||||
# The macro $(MFLAGS-adjusted) calls this script to
|
||||
# adjust the "-j" arguments to take into account
|
||||
# the HOTSPOT_BUILD_JOBS variable. The default
|
||||
# handling of the "-j" argument by gnumake does
|
||||
# not meet our needs, so we must adjust it ourselves.
|
||||
|
||||
# This argument adjustment applies to two recursive
|
||||
# calls to "$(MAKE) $(MFLAGS-adjusted)" in top.make.
|
||||
# One invokes adlc.make, and the other invokes vm.make.
|
||||
# The adjustment propagates the desired concurrency
|
||||
# level down to the sub-make (of the adlc or vm).
|
||||
# The default behavior of gnumake is to run all
|
||||
# sub-makes without concurrency ("-j1").
|
||||
|
||||
# Also, we use a make variable rather than an explicit
|
||||
# "-j<N>" argument to control this setting, so that
|
||||
# the concurrency setting (which must be tuned separately
|
||||
# for each MP system) can be set via an environment variable.
|
||||
# The recommended setting is 1.5x to 2x the number of available
|
||||
# CPUs on the MP system, which is large enough to keep the CPUs
|
||||
# busy (even though some jobs may be I/O bound) but not too large,
|
||||
# we may presume, to overflow the system's swap space.
|
||||
|
||||
set -eu
|
||||
|
||||
default_build_jobs=4
|
||||
|
||||
case $# in
|
||||
[12]) true;;
|
||||
*) >&2 echo "Usage: $0 ${MFLAGS} ${HOTSPOT_BUILD_JOBS}"; exit 2;;
|
||||
esac
|
||||
|
||||
MFLAGS=$1
|
||||
HOTSPOT_BUILD_JOBS=${2-}
|
||||
|
||||
# Normalize any -jN argument to the form " -j${HBJ}"
|
||||
MFLAGS=`
|
||||
echo "$MFLAGS" \
|
||||
| sed '
|
||||
s/^-/ -/
|
||||
s/ -\([^ ][^ ]*\)j/ -\1 -j/
|
||||
s/ -j[0-9][0-9]*/ -j/
|
||||
s/ -j\([^ ]\)/ -j -\1/
|
||||
s/ -j/ -j'${HOTSPOT_BUILD_JOBS:-${default_build_jobs}}'/
|
||||
' `
|
||||
|
||||
case ${HOTSPOT_BUILD_JOBS} in \
|
||||
|
||||
'') case ${MFLAGS} in
|
||||
*\ -j*)
|
||||
>&2 echo "# Note: -jN is ineffective for setting parallelism in this makefile."
|
||||
>&2 echo "# please set HOTSPOT_BUILD_JOBS=${default_build_jobs} in the command line or environment."
|
||||
esac;;
|
||||
|
||||
?*) case ${MFLAGS} in
|
||||
*\ -j*) true;;
|
||||
*) MFLAGS="-j${HOTSPOT_BUILD_JOBS} ${MFLAGS}";;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
echo "${MFLAGS}"
|
231
hotspot/make/aix/makefiles/adlc.make
Normal file
231
hotspot/make/aix/makefiles/adlc.make
Normal file
@ -0,0 +1,231 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# This makefile (adlc.make) is included from the adlc.make in the
|
||||
# build directories.
|
||||
# It knows how to compile, link, and run the adlc.
|
||||
|
||||
include $(GAMMADIR)/make/$(Platform_os_family)/makefiles/rules.make
|
||||
|
||||
# #########################################################################
|
||||
|
||||
# OUTDIR must be the same as AD_Dir = $(GENERATED)/adfiles in top.make:
|
||||
GENERATED = ../generated
|
||||
OUTDIR = $(GENERATED)/adfiles
|
||||
|
||||
ARCH = $(Platform_arch)
|
||||
OS = $(Platform_os_family)
|
||||
|
||||
SOURCE.AD = $(OUTDIR)/$(OS)_$(Platform_arch_model).ad
|
||||
|
||||
ifeq ("${Platform_arch_model}", "${Platform_arch}")
|
||||
SOURCES.AD = \
|
||||
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad)
|
||||
else
|
||||
SOURCES.AD = \
|
||||
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch_model).ad) \
|
||||
$(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(ARCH)/vm/$(Platform_arch).ad)
|
||||
endif
|
||||
|
||||
EXEC = $(OUTDIR)/adlc
|
||||
|
||||
# set VPATH so make knows where to look for source files
|
||||
Src_Dirs_V += $(GAMMADIR)/src/share/vm/adlc
|
||||
VPATH += $(Src_Dirs_V:%=%:)
|
||||
|
||||
# set INCLUDES for C preprocessor
|
||||
Src_Dirs_I += $(GAMMADIR)/src/share/vm/adlc $(GENERATED)
|
||||
INCLUDES += $(Src_Dirs_I:%=-I%)
|
||||
|
||||
# set flags for adlc compilation
|
||||
CXXFLAGS = $(SYSDEFS) $(INCLUDES)
|
||||
|
||||
# Force assertions on.
|
||||
CXXFLAGS += -DASSERT
|
||||
|
||||
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
|
||||
# Suppress warnings (for now)
|
||||
CFLAGS_WARN = -w
|
||||
CFLAGS += $(CFLAGS_WARN)
|
||||
|
||||
OBJECTNAMES = \
|
||||
adlparse.o \
|
||||
archDesc.o \
|
||||
arena.o \
|
||||
dfa.o \
|
||||
dict2.o \
|
||||
filebuff.o \
|
||||
forms.o \
|
||||
formsopt.o \
|
||||
formssel.o \
|
||||
main.o \
|
||||
adlc-opcodes.o \
|
||||
output_c.o \
|
||||
output_h.o \
|
||||
|
||||
OBJECTS = $(OBJECTNAMES:%=$(OUTDIR)/%)
|
||||
|
||||
GENERATEDNAMES = \
|
||||
ad_$(Platform_arch_model).cpp \
|
||||
ad_$(Platform_arch_model).hpp \
|
||||
ad_$(Platform_arch_model)_clone.cpp \
|
||||
ad_$(Platform_arch_model)_expand.cpp \
|
||||
ad_$(Platform_arch_model)_format.cpp \
|
||||
ad_$(Platform_arch_model)_gen.cpp \
|
||||
ad_$(Platform_arch_model)_misc.cpp \
|
||||
ad_$(Platform_arch_model)_peephole.cpp \
|
||||
ad_$(Platform_arch_model)_pipeline.cpp \
|
||||
adGlobals_$(Platform_arch_model).hpp \
|
||||
dfa_$(Platform_arch_model).cpp \
|
||||
|
||||
GENERATEDFILES = $(GENERATEDNAMES:%=$(OUTDIR)/%)
|
||||
|
||||
# #########################################################################
|
||||
|
||||
all: $(EXEC)
|
||||
|
||||
$(EXEC) : $(OBJECTS)
|
||||
@echo Making adlc
|
||||
$(QUIETLY) $(HOST.LINK_NOPROF.CXX) -o $(EXEC) $(OBJECTS)
|
||||
|
||||
# Random dependencies:
|
||||
$(OBJECTS): opcodes.hpp classes.hpp adlc.hpp adlcVMDeps.hpp adlparse.hpp archDesc.hpp arena.hpp dict2.hpp filebuff.hpp forms.hpp formsopt.hpp formssel.hpp
|
||||
|
||||
# The source files refer to ostream.h, which sparcworks calls iostream.h
|
||||
$(OBJECTS): ostream.h
|
||||
|
||||
ostream.h :
|
||||
@echo >$@ '#include <iostream.h>'
|
||||
|
||||
dump:
|
||||
: OUTDIR=$(OUTDIR)
|
||||
: OBJECTS=$(OBJECTS)
|
||||
: products = $(GENERATEDFILES)
|
||||
|
||||
all: $(GENERATEDFILES)
|
||||
|
||||
$(GENERATEDFILES): refresh_adfiles
|
||||
|
||||
# Get a unique temporary directory name, so multiple makes can run in parallel.
|
||||
# Note that product files are updated via "mv", which is atomic.
|
||||
TEMPDIR := $(OUTDIR)/mktmp$(shell echo $$$$)
|
||||
|
||||
# Debuggable by default
|
||||
CFLAGS += -g
|
||||
|
||||
# Pass -D flags into ADLC.
|
||||
ADLCFLAGS += $(SYSDEFS)
|
||||
|
||||
# Note "+="; it is a hook so flags.make can add more flags, like -g or -DFOO.
|
||||
ADLCFLAGS += -q -T
|
||||
|
||||
# Normally, debugging is done directly on the ad_<arch>*.cpp files.
|
||||
# But -g will put #line directives in those files pointing back to <arch>.ad.
|
||||
# Some builds of gcc 3.2 have a bug that gets tickled by the extra #line directives
|
||||
# so skip it for 3.2 and ealier.
|
||||
ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
|
||||
ADLCFLAGS += -g
|
||||
endif
|
||||
|
||||
ifdef LP64
|
||||
ADLCFLAGS += -D_LP64
|
||||
else
|
||||
ADLCFLAGS += -U_LP64
|
||||
endif
|
||||
|
||||
#
|
||||
# adlc_updater is a simple sh script, under sccs control. It is
|
||||
# used to selectively update generated adlc files. This should
|
||||
# provide a nice compilation speed improvement.
|
||||
#
|
||||
ADLC_UPDATER_DIRECTORY = $(GAMMADIR)/make/$(OS)
|
||||
ADLC_UPDATER = adlc_updater
|
||||
$(ADLC_UPDATER): $(ADLC_UPDATER_DIRECTORY)/$(ADLC_UPDATER)
|
||||
$(QUIETLY) cp $< $@; chmod +x $@
|
||||
|
||||
# This action refreshes all generated adlc files simultaneously.
|
||||
# The way it works is this:
|
||||
# 1) create a scratch directory to work in.
|
||||
# 2) if the current working directory does not have $(ADLC_UPDATER), copy it.
|
||||
# 3) run the compiled adlc executable. This will create new adlc files in the scratch directory.
|
||||
# 4) call $(ADLC_UPDATER) on each generated adlc file. It will selectively update changed or missing files.
|
||||
# 5) If we actually updated any files, echo a notice.
|
||||
#
|
||||
refresh_adfiles: $(EXEC) $(SOURCE.AD) $(ADLC_UPDATER)
|
||||
@rm -rf $(TEMPDIR); mkdir $(TEMPDIR)
|
||||
$(QUIETLY) $(EXEC) $(ADLCFLAGS) $(SOURCE.AD) \
|
||||
-c$(TEMPDIR)/ad_$(Platform_arch_model).cpp -h$(TEMPDIR)/ad_$(Platform_arch_model).hpp -a$(TEMPDIR)/dfa_$(Platform_arch_model).cpp -v$(TEMPDIR)/adGlobals_$(Platform_arch_model).hpp \
|
||||
|| { rm -rf $(TEMPDIR); exit 1; }
|
||||
$(QUIETLY) ./$(ADLC_UPDATER) ad_$(Platform_arch_model).cpp $(TEMPDIR) $(OUTDIR)
|
||||
$(QUIETLY) ./$(ADLC_UPDATER) ad_$(Platform_arch_model).hpp $(TEMPDIR) $(OUTDIR)
|
||||
$(QUIETLY) ./$(ADLC_UPDATER) ad_$(Platform_arch_model)_clone.cpp $(TEMPDIR) $(OUTDIR)
|
||||
$(QUIETLY) ./$(ADLC_UPDATER) ad_$(Platform_arch_model)_expand.cpp $(TEMPDIR) $(OUTDIR)
|
||||
$(QUIETLY) ./$(ADLC_UPDATER) ad_$(Platform_arch_model)_format.cpp $(TEMPDIR) $(OUTDIR)
|
||||
$(QUIETLY) ./$(ADLC_UPDATER) ad_$(Platform_arch_model)_gen.cpp $(TEMPDIR) $(OUTDIR)
|
||||
$(QUIETLY) ./$(ADLC_UPDATER) ad_$(Platform_arch_model)_misc.cpp $(TEMPDIR) $(OUTDIR)
|
||||
$(QUIETLY) ./$(ADLC_UPDATER) ad_$(Platform_arch_model)_peephole.cpp $(TEMPDIR) $(OUTDIR)
|
||||
$(QUIETLY) ./$(ADLC_UPDATER) ad_$(Platform_arch_model)_pipeline.cpp $(TEMPDIR) $(OUTDIR)
|
||||
$(QUIETLY) ./$(ADLC_UPDATER) adGlobals_$(Platform_arch_model).hpp $(TEMPDIR) $(OUTDIR)
|
||||
$(QUIETLY) ./$(ADLC_UPDATER) dfa_$(Platform_arch_model).cpp $(TEMPDIR) $(OUTDIR)
|
||||
$(QUIETLY) [ -f $(TEMPDIR)/made-change ] \
|
||||
|| echo "Rescanned $(SOURCE.AD) but encountered no changes."
|
||||
$(QUIETLY) rm -rf $(TEMPDIR)
|
||||
|
||||
|
||||
# #########################################################################
|
||||
|
||||
$(SOURCE.AD): $(SOURCES.AD)
|
||||
$(QUIETLY) $(PROCESS_AD_FILES) $(SOURCES.AD) > $(SOURCE.AD)
|
||||
|
||||
#PROCESS_AD_FILES = cat
|
||||
# Pass through #line directives, in case user enables -g option above:
|
||||
PROCESS_AD_FILES = awk '{ \
|
||||
if (CUR_FN != FILENAME) { CUR_FN=FILENAME; NR_BASE=NR-1; need_lineno=1 } \
|
||||
if (need_lineno && $$0 !~ /\/\//) \
|
||||
{ print "\n\n\#line " (NR-NR_BASE) " \"" FILENAME "\""; need_lineno=0 }; \
|
||||
print }'
|
||||
|
||||
$(OUTDIR)/%.o: %.cpp
|
||||
@echo Compiling $<
|
||||
$(QUIETLY) $(REMOVE_TARGET)
|
||||
$(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE)
|
||||
|
||||
# Some object files are given a prefix, to disambiguate
|
||||
# them from objects of the same name built for the VM.
|
||||
$(OUTDIR)/adlc-%.o: %.cpp
|
||||
@echo Compiling $<
|
||||
$(QUIETLY) $(REMOVE_TARGET)
|
||||
$(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE)
|
||||
|
||||
# #########################################################################
|
||||
|
||||
clean:
|
||||
rm $(OBJECTS)
|
||||
|
||||
cleanall:
|
||||
rm $(OBJECTS) $(EXEC)
|
||||
|
||||
# #########################################################################
|
||||
|
||||
.PHONY: all dump refresh_adfiles clean cleanall
|
18
hotspot/make/aix/makefiles/build_vm_def.sh
Normal file
18
hotspot/make/aix/makefiles/build_vm_def.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# If we're cross compiling use that path for nm
|
||||
if [ "$CROSS_COMPILE_ARCH" != "" ]; then
|
||||
NM=$ALT_COMPILER_PATH/nm
|
||||
else
|
||||
# On AIX we have to prevent that we pick up the 'nm' version from the GNU binutils
|
||||
# which may be installed under /opt/freeware/bin. So better use an absolute path here!
|
||||
NM=/usr/bin/nm
|
||||
fi
|
||||
|
||||
$NM -X64 -B -C $* \
|
||||
| awk '{
|
||||
if (($2="d" || $2="D") && ($3 ~ /^__vft/ || $3 ~ /^gHotSpotVM/)) print "\t" $3 ";"
|
||||
if ($3 ~ /^UseSharedSpaces$/) print "\t" $3 ";"
|
||||
if ($3 ~ /^SharedArchivePath__9Arguments$/) print "\t" $3 ";"
|
||||
}' \
|
||||
| sort -u
|
364
hotspot/make/aix/makefiles/buildtree.make
Normal file
364
hotspot/make/aix/makefiles/buildtree.make
Normal file
@ -0,0 +1,364 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Usage:
|
||||
#
|
||||
# $(MAKE) -f buildtree.make SRCARCH=srcarch BUILDARCH=buildarch LIBARCH=libarch
|
||||
# GAMMADIR=dir OS_FAMILY=os VARIANT=variant
|
||||
#
|
||||
# The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
|
||||
# environment or on the command-line:
|
||||
#
|
||||
# ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
|
||||
# BUILDARCH - build directory
|
||||
# LIBARCH - the corresponding directory in JDK/JRE
|
||||
# GAMMADIR - top of workspace
|
||||
# OS_FAMILY - operating system
|
||||
# VARIANT - core, compiler1, compiler2, or tiered
|
||||
# HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07)
|
||||
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty
|
||||
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
|
||||
#
|
||||
# Builds the directory trees with makefiles plus some convenience files in
|
||||
# each directory:
|
||||
#
|
||||
# Makefile - for "make foo"
|
||||
# flags.make - with macro settings
|
||||
# vm.make - to support making "$(MAKE) -v vm.make" in makefiles
|
||||
# adlc.make -
|
||||
# trace.make - generate tracing event and type definitions
|
||||
# jvmti.make - generate JVMTI bindings from the spec (JSR-163)
|
||||
# sa.make - generate SA jar file and natives
|
||||
#
|
||||
# The makefiles are split this way so that "make foo" will run faster by not
|
||||
# having to read the dependency files for the vm.
|
||||
|
||||
-include $(SPEC)
|
||||
include $(GAMMADIR)/make/scm.make
|
||||
include $(GAMMADIR)/make/defs.make
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
|
||||
# 'gmake MAKE_VERBOSE=y' or 'gmake QUIETLY=' gives all the gory details.
|
||||
QUIETLY$(MAKE_VERBOSE) = @
|
||||
|
||||
ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
|
||||
PLATFORM_FILE = $(shell dirname $(shell dirname $(shell pwd)))/platform_zero
|
||||
else
|
||||
ifdef USE_SUNCC
|
||||
PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH).suncc
|
||||
else
|
||||
PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Allow overriding of the arch part of the directory but default
|
||||
# to BUILDARCH if nothing is specified
|
||||
ifeq ($(VARIANTARCH),)
|
||||
VARIANTARCH=$(BUILDARCH)
|
||||
endif
|
||||
|
||||
ifdef FORCE_TIERED
|
||||
ifeq ($(VARIANT),tiered)
|
||||
PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_compiler2
|
||||
else
|
||||
PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_$(VARIANT)
|
||||
endif
|
||||
else
|
||||
PLATFORM_DIR = $(OS_FAMILY)_$(VARIANTARCH)_$(VARIANT)
|
||||
endif
|
||||
|
||||
#
|
||||
# We do two levels of exclusion in the shared directory.
|
||||
# TOPLEVEL excludes are pruned, they are not recursively searched,
|
||||
# but lower level directories can be named without fear of collision.
|
||||
# ALWAYS excludes are excluded at any level in the directory tree.
|
||||
#
|
||||
|
||||
ALWAYS_EXCLUDE_DIRS = $(SCM_DIRS)
|
||||
|
||||
ifeq ($(VARIANT),tiered)
|
||||
TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name agent
|
||||
else
|
||||
ifeq ($(VARIANT),compiler2)
|
||||
TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name c1 -o -name agent
|
||||
else
|
||||
# compiler1 and core use the same exclude list
|
||||
TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name opto -o -name libadt -o -name agent
|
||||
endif
|
||||
endif
|
||||
|
||||
# Get things from the platform file.
|
||||
COMPILER = $(shell sed -n 's/^compiler[ ]*=[ ]*//p' $(PLATFORM_FILE))
|
||||
|
||||
SIMPLE_DIRS = \
|
||||
$(PLATFORM_DIR)/generated/dependencies \
|
||||
$(PLATFORM_DIR)/generated/adfiles \
|
||||
$(PLATFORM_DIR)/generated/jvmtifiles \
|
||||
$(PLATFORM_DIR)/generated/tracefiles
|
||||
|
||||
TARGETS = debug fastdebug optimized product
|
||||
SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
|
||||
|
||||
# For dependencies and recursive makes.
|
||||
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
|
||||
|
||||
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make
|
||||
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
|
||||
SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
|
||||
|
||||
# Define variables to be set in flags.make.
|
||||
# Default values are set in make/defs.make.
|
||||
ifeq ($(HOTSPOT_BUILD_VERSION),)
|
||||
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
|
||||
else
|
||||
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
|
||||
endif
|
||||
# Set BUILD_USER from system-dependent hints: $LOGNAME, $(whoami)
|
||||
ifndef HOTSPOT_BUILD_USER
|
||||
HOTSPOT_BUILD_USER := $(shell echo $$LOGNAME)
|
||||
endif
|
||||
ifndef HOTSPOT_BUILD_USER
|
||||
HOTSPOT_BUILD_USER := $(shell whoami)
|
||||
endif
|
||||
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
|
||||
# or make/hotspot_distro.
|
||||
ifndef HOTSPOT_VM_DISTRO
|
||||
ifeq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
|
||||
include $(GAMMADIR)/make/hotspot_distro
|
||||
else
|
||||
include $(GAMMADIR)/make/openjdk_distro
|
||||
endif
|
||||
endif
|
||||
|
||||
# if hotspot-only build and/or OPENJDK isn't passed down, need to set OPENJDK
|
||||
ifndef OPENJDK
|
||||
ifneq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
|
||||
OPENJDK=true
|
||||
endif
|
||||
endif
|
||||
|
||||
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
|
||||
|
||||
BUILDTREE = \
|
||||
$(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_TARGETS) $(BUILDTREE_VARS)
|
||||
|
||||
BUILDTREE_COMMENT = echo "\# Generated by $(BUILDTREE_MAKE)"
|
||||
|
||||
all: $(SUBMAKE_DIRS)
|
||||
|
||||
# Run make in each subdirectory recursively.
|
||||
$(SUBMAKE_DIRS): $(SIMPLE_DIRS) FORCE
|
||||
$(QUIETLY) [ -d $@ ] || { mkdir -p $@; }
|
||||
$(QUIETLY) cd $@ && $(BUILDTREE) TARGET=$(@F)
|
||||
$(QUIETLY) touch $@
|
||||
|
||||
$(SIMPLE_DIRS):
|
||||
$(QUIETLY) mkdir -p $@
|
||||
|
||||
# Convenience macro which takes a source relative path, applies $(1) to the
|
||||
# absolute path, and then replaces $(GAMMADIR) in the result with a
|
||||
# literal "$(GAMMADIR)/" suitable for inclusion in a Makefile.
|
||||
gamma-path=$(subst $(GAMMADIR),\$$(GAMMADIR),$(call $(1),$(HS_COMMON_SRC)/$(2)))
|
||||
|
||||
# This bit is needed to enable local rebuilds.
|
||||
# Unless the makefile itself sets LP64, any environmental
|
||||
# setting of LP64 will interfere with the build.
|
||||
LP64_SETTING/32 = LP64 = \#empty
|
||||
LP64_SETTING/64 = LP64 = 1
|
||||
|
||||
DATA_MODE/ppc64 = 64
|
||||
|
||||
DATA_MODE = $(DATA_MODE/$(BUILDARCH))
|
||||
|
||||
flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
$(BUILDTREE_COMMENT); \
|
||||
echo; \
|
||||
echo "Platform_file = $(PLATFORM_FILE)" | sed 's|$(GAMMADIR)|$$(GAMMADIR)|'; \
|
||||
sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \
|
||||
echo; \
|
||||
echo "GAMMADIR = $(GAMMADIR)"; \
|
||||
echo "HS_ALT_MAKE = $(HS_ALT_MAKE)"; \
|
||||
echo "OSNAME = $(OSNAME)"; \
|
||||
echo "SYSDEFS = \$$(Platform_sysdefs)"; \
|
||||
echo "SRCARCH = $(SRCARCH)"; \
|
||||
echo "BUILDARCH = $(BUILDARCH)"; \
|
||||
echo "LIBARCH = $(LIBARCH)"; \
|
||||
echo "TARGET = $(TARGET)"; \
|
||||
echo "HS_BUILD_VER = $(HS_BUILD_VER)"; \
|
||||
echo "JRE_RELEASE_VER = $(JRE_RELEASE_VERSION)"; \
|
||||
echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
|
||||
echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
|
||||
echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
|
||||
echo "OPENJDK = $(OPENJDK)"; \
|
||||
echo "$(LP64_SETTING/$(DATA_MODE))"; \
|
||||
echo; \
|
||||
echo "# Used for platform dispatching"; \
|
||||
echo "TARGET_DEFINES = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \
|
||||
echo "TARGET_DEFINES += -DTARGET_ARCH_\$$(Platform_arch)"; \
|
||||
echo "TARGET_DEFINES += -DTARGET_ARCH_MODEL_\$$(Platform_arch_model)"; \
|
||||
echo "TARGET_DEFINES += -DTARGET_OS_ARCH_\$$(Platform_os_arch)"; \
|
||||
echo "TARGET_DEFINES += -DTARGET_OS_ARCH_MODEL_\$$(Platform_os_arch_model)"; \
|
||||
echo "TARGET_DEFINES += -DTARGET_COMPILER_\$$(Platform_compiler)"; \
|
||||
echo "CFLAGS += \$$(TARGET_DEFINES)"; \
|
||||
echo; \
|
||||
echo "Src_Dirs_V = \\"; \
|
||||
sed 's/$$/ \\/;s|$(GAMMADIR)|$$(GAMMADIR)|' ../shared_dirs.lst; \
|
||||
echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
|
||||
echo; \
|
||||
echo "Src_Dirs_I = \\"; \
|
||||
echo "$(call gamma-path,altsrc,share/vm/prims) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,share/vm/prims) \\"; \
|
||||
echo "$(call gamma-path,altsrc,share/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,share/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,share/vm/precompiled) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,share/vm/precompiled) \\"; \
|
||||
echo "$(call gamma-path,altsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,cpu/$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os_cpu/$(OS_FAMILY)_$(SRCARCH)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/$(OS_FAMILY)/vm) \\"; \
|
||||
echo "$(call gamma-path,altsrc,os/posix/vm) \\"; \
|
||||
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
|
||||
[ -n "$(CFLAGS_BROWSE)" ] && \
|
||||
echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
|
||||
[ -n "$(ENABLE_FULL_DEBUG_SYMBOLS)" ] && \
|
||||
echo && echo "ENABLE_FULL_DEBUG_SYMBOLS = $(ENABLE_FULL_DEBUG_SYMBOLS)"; \
|
||||
[ -n "$(OBJCOPY)" ] && \
|
||||
echo && echo "OBJCOPY = $(OBJCOPY)"; \
|
||||
[ -n "$(STRIP_POLICY)" ] && \
|
||||
echo && echo "STRIP_POLICY = $(STRIP_POLICY)"; \
|
||||
[ -n "$(ZIP_DEBUGINFO_FILES)" ] && \
|
||||
echo && echo "ZIP_DEBUGINFO_FILES = $(ZIP_DEBUGINFO_FILES)"; \
|
||||
[ -n "$(ZIPEXE)" ] && \
|
||||
echo && echo "ZIPEXE = $(ZIPEXE)"; \
|
||||
[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
|
||||
echo && \
|
||||
echo "HOTSPOT_EXTRA_SYSDEFS\$$(HOTSPOT_EXTRA_SYSDEFS) = $(HOTSPOT_EXTRA_SYSDEFS)" && \
|
||||
echo "SYSDEFS += \$$(HOTSPOT_EXTRA_SYSDEFS)"; \
|
||||
[ -n "$(INCLUDE_TRACE)" ] && \
|
||||
echo && echo "INCLUDE_TRACE = $(INCLUDE_TRACE)"; \
|
||||
echo; \
|
||||
[ -n "$(SPEC)" ] && \
|
||||
echo "include $(SPEC)"; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \
|
||||
echo "include \$$(GAMMADIR)/make/excludeSrc.make"; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \
|
||||
) > $@
|
||||
|
||||
flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
$(BUILDTREE_COMMENT); \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(TARGET).make"; \
|
||||
) > $@
|
||||
|
||||
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
|
||||
@echo Creating directory list $@
|
||||
$(QUIETLY) if [ -d $(HS_ALT_SRC)/share/vm ]; then \
|
||||
find $(HS_ALT_SRC)/share/vm/* -prune \
|
||||
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
||||
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@; \
|
||||
fi;
|
||||
$(QUIETLY) find $(HS_COMMON_SRC)/share/vm/* -prune \
|
||||
-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
|
||||
\( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; >> $@
|
||||
|
||||
Makefile: $(BUILDTREE_MAKE)
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
$(BUILDTREE_COMMENT); \
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/top.make"; \
|
||||
) > $@
|
||||
|
||||
vm.make: $(BUILDTREE_MAKE)
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
$(BUILDTREE_COMMENT); \
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo include flags_vm.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
adlc.make: $(BUILDTREE_MAKE)
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
$(BUILDTREE_COMMENT); \
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
jvmti.make: $(BUILDTREE_MAKE)
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
$(BUILDTREE_COMMENT); \
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
trace.make: $(BUILDTREE_MAKE)
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
$(BUILDTREE_COMMENT); \
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
sa.make: $(BUILDTREE_MAKE)
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
$(BUILDTREE_COMMENT); \
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
FORCE:
|
||||
|
||||
.PHONY: all FORCE
|
32
hotspot/make/aix/makefiles/compiler2.make
Normal file
32
hotspot/make/aix/makefiles/compiler2.make
Normal file
@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making server version of VM
|
||||
|
||||
TYPE=COMPILER2
|
||||
|
||||
VM_SUBDIR = server
|
||||
|
||||
CFLAGS += -DCOMPILER2
|
33
hotspot/make/aix/makefiles/core.make
Normal file
33
hotspot/make/aix/makefiles/core.make
Normal file
@ -0,0 +1,33 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making core version of VM
|
||||
|
||||
# Select which files to use (in top.make)
|
||||
TYPE=CORE
|
||||
|
||||
# There is no "core" directory in JDK. Install core build in server directory.
|
||||
VM_SUBDIR = server
|
||||
|
||||
# Note: macros.hpp defines CORE
|
41
hotspot/make/aix/makefiles/debug.make
Normal file
41
hotspot/make/aix/makefiles/debug.make
Normal file
@ -0,0 +1,41 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making debug version of VM
|
||||
|
||||
# Compiler specific DEBUG_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
DEBUG_CFLAGS/DEFAULT= $(DEBUG_CFLAGS)
|
||||
DEBUG_CFLAGS/BYFILE = $(DEBUG_CFLAGS/$@)$(DEBUG_CFLAGS/DEFAULT$(DEBUG_CFLAGS/$@))
|
||||
CFLAGS += $(DEBUG_CFLAGS/BYFILE)
|
||||
|
||||
# Set the environment variable HOTSPARC_GENERIC to "true"
|
||||
# to inhibit the effect of the previous line on CFLAGS.
|
||||
|
||||
# Linker mapfile
|
||||
MAPFILE = $(GAMMADIR)/make/aix/makefiles/mapfile-vers-debug
|
||||
|
||||
VERSION = debug
|
||||
SYSDEFS += -DASSERT -DDEBUG
|
||||
PICFLAGS = DEFAULT
|
231
hotspot/make/aix/makefiles/defs.make
Normal file
231
hotspot/make/aix/makefiles/defs.make
Normal file
@ -0,0 +1,231 @@
|
||||
#
|
||||
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# The common definitions for hotspot AIX builds.
|
||||
# Include the top level defs.make under make directory instead of this one.
|
||||
# This file is included into make/defs.make.
|
||||
|
||||
SLASH_JAVA ?= /java
|
||||
|
||||
# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
|
||||
#ARCH:=$(shell uname -m)
|
||||
PATH_SEP = :
|
||||
ifeq ($(LP64), 1)
|
||||
ARCH_DATA_MODEL ?= 64
|
||||
else
|
||||
ARCH_DATA_MODEL ?= 32
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH_DATA_MODEL), 64)
|
||||
ARCH = ppc64
|
||||
else
|
||||
ARCH = ppc
|
||||
endif
|
||||
|
||||
# PPC
|
||||
ifeq ($(ARCH), ppc)
|
||||
#ARCH_DATA_MODEL = 32
|
||||
PLATFORM = aix-ppc
|
||||
VM_PLATFORM = aix_ppc
|
||||
HS_ARCH = ppc
|
||||
endif
|
||||
|
||||
# PPC64
|
||||
ifeq ($(ARCH), ppc64)
|
||||
#ARCH_DATA_MODEL = 64
|
||||
MAKE_ARGS += LP64=1
|
||||
PLATFORM = aix-ppc64
|
||||
VM_PLATFORM = aix_ppc64
|
||||
HS_ARCH = ppc
|
||||
endif
|
||||
|
||||
# On 32 bit aix we build server and client, on 64 bit just server.
|
||||
ifeq ($(JVM_VARIANTS),)
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
JVM_VARIANTS:=client,server
|
||||
JVM_VARIANT_CLIENT:=true
|
||||
JVM_VARIANT_SERVER:=true
|
||||
else
|
||||
JVM_VARIANTS:=server
|
||||
JVM_VARIANT_SERVER:=true
|
||||
endif
|
||||
endif
|
||||
|
||||
# determine if HotSpot is being built in JDK6 or earlier version
|
||||
JDK6_OR_EARLIER=0
|
||||
ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
|
||||
# if the longer variable names (newer build style) are set, then check those
|
||||
ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
|
||||
JDK6_OR_EARLIER=1
|
||||
endif
|
||||
else
|
||||
# the longer variables aren't set so check the shorter variable names
|
||||
ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
|
||||
JDK6_OR_EARLIER=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(JDK6_OR_EARLIER),0)
|
||||
# Full Debug Symbols is supported on JDK7 or newer.
|
||||
# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
|
||||
# builds is enabled with debug info files ZIP'ed to save space. For
|
||||
# BUILD_FLAVOR != product builds, FDS is always enabled, after all a
|
||||
# debug build without debug info isn't very useful.
|
||||
# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
|
||||
#
|
||||
# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
|
||||
# disabled for a BUILD_FLAVOR == product build.
|
||||
#
|
||||
# Note: Use of a different variable name for the FDS override option
|
||||
# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
|
||||
# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
|
||||
# in options via environment variables, use of distinct variables
|
||||
# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
|
||||
# product build, the FULL_DEBUG_SYMBOLS environment variable will be
|
||||
# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
|
||||
# the same variable name is used, then different values can be picked
|
||||
# up by different parts of the build. Just to be clear, we only need
|
||||
# two variable names because the incoming option value can be
|
||||
# overridden in some situations, e.g., a BUILD_FLAVOR != product
|
||||
# build.
|
||||
|
||||
# Due to the multiple sub-make processes that occur this logic gets
|
||||
# executed multiple times. We reduce the noise by at least checking that
|
||||
# BUILD_FLAVOR has been set.
|
||||
ifneq ($(BUILD_FLAVOR),)
|
||||
ifeq ($(BUILD_FLAVOR), product)
|
||||
FULL_DEBUG_SYMBOLS ?= 1
|
||||
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
|
||||
else
|
||||
# debug variants always get Full Debug Symbols (if available)
|
||||
ENABLE_FULL_DEBUG_SYMBOLS = 1
|
||||
endif
|
||||
_JUNK_ := $(shell \
|
||||
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
|
||||
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
|
||||
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
# Default OBJCOPY comes from GNU Binutils on Linux
|
||||
ifeq ($(CROSS_COMPILE_ARCH),)
|
||||
DEF_OBJCOPY=/usr/bin/objcopy
|
||||
else
|
||||
# Assume objcopy is part of the cross-compilation toolset
|
||||
ifneq ($(ALT_COMPILER_PATH),)
|
||||
DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
|
||||
endif
|
||||
endif
|
||||
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
|
||||
ifneq ($(ALT_OBJCOPY),)
|
||||
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
|
||||
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
|
||||
endif
|
||||
|
||||
ifeq ($(OBJCOPY),)
|
||||
_JUNK_ := $(shell \
|
||||
echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY.")
|
||||
ENABLE_FULL_DEBUG_SYMBOLS=0
|
||||
_JUNK_ := $(shell \
|
||||
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
|
||||
else
|
||||
_JUNK_ := $(shell \
|
||||
echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
|
||||
|
||||
# Library stripping policies for .debuginfo configs:
|
||||
# all_strip - strips everything from the library
|
||||
# min_strip - strips most stuff from the library; leaves minimum symbols
|
||||
# no_strip - does not strip the library at all
|
||||
#
|
||||
# Oracle security policy requires "all_strip". A waiver was granted on
|
||||
# 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
|
||||
#
|
||||
# Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
|
||||
#
|
||||
STRIP_POLICY ?= min_strip
|
||||
|
||||
_JUNK_ := $(shell \
|
||||
echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
|
||||
|
||||
ZIP_DEBUGINFO_FILES ?= 1
|
||||
|
||||
_JUNK_ := $(shell \
|
||||
echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
|
||||
endif
|
||||
endif # ENABLE_FULL_DEBUG_SYMBOLS=1
|
||||
endif # BUILD_FLAVOR
|
||||
endif # JDK_6_OR_EARLIER
|
||||
|
||||
# unused JDK_INCLUDE_SUBDIR=aix
|
||||
|
||||
# Library suffix
|
||||
LIBRARY_SUFFIX=so
|
||||
|
||||
EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
|
||||
|
||||
# client and server subdirectories have symbolic links to ../libjsig.so
|
||||
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
|
||||
#ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
# ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||
# EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
|
||||
# else
|
||||
# EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
|
||||
# endif
|
||||
#endif
|
||||
EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
|
||||
EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
|
||||
EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal
|
||||
|
||||
ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK) $(JVM_VARIANT_CORE)), true)
|
||||
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
|
||||
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
|
||||
# ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
# ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||
# EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
|
||||
# else
|
||||
# EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
|
||||
# endif
|
||||
# endif
|
||||
endif
|
||||
|
||||
ifeq ($(JVM_VARIANT_CLIENT),true)
|
||||
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
|
||||
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
|
||||
# ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
# ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||
# EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
|
||||
# else
|
||||
# EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
|
||||
# endif
|
||||
# endif
|
||||
endif
|
||||
|
||||
# Serviceability Binaries
|
||||
# No SA Support for PPC or zero
|
||||
ADD_SA_BINARIES/ppc =
|
||||
ADD_SA_BINARIES/ppc64 =
|
||||
ADD_SA_BINARIES/zero =
|
||||
|
||||
EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
|
||||
|
||||
|
27
hotspot/make/aix/makefiles/dtrace.make
Normal file
27
hotspot/make/aix/makefiles/dtrace.make
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Linux does not build jvm_db
|
||||
LIBJVM_DB =
|
||||
|
73
hotspot/make/aix/makefiles/fastdebug.make
Normal file
73
hotspot/make/aix/makefiles/fastdebug.make
Normal file
@ -0,0 +1,73 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making debug version of VM
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
# Pare down optimization to -O2 if xlCV10.1 is in use.
|
||||
OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS) $(QV10_OPT_CONSERVATIVE)
|
||||
OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
|
||||
|
||||
# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
|
||||
|
||||
ifeq ($(BUILDARCH), ia64)
|
||||
# Bug in GCC, causes hang. -O1 will override the -O3 specified earlier
|
||||
OPT_CFLAGS/callGenerator.o += -O1
|
||||
OPT_CFLAGS/ciTypeFlow.o += -O1
|
||||
OPT_CFLAGS/compile.o += -O1
|
||||
OPT_CFLAGS/concurrentMarkSweepGeneration.o += -O1
|
||||
OPT_CFLAGS/doCall.o += -O1
|
||||
OPT_CFLAGS/generateOopMap.o += -O1
|
||||
OPT_CFLAGS/generateOptoStub.o += -O1
|
||||
OPT_CFLAGS/graphKit.o += -O1
|
||||
OPT_CFLAGS/instanceKlass.o += -O1
|
||||
OPT_CFLAGS/interpreterRT_ia64.o += -O1
|
||||
OPT_CFLAGS/output.o += -O1
|
||||
OPT_CFLAGS/parse1.o += -O1
|
||||
OPT_CFLAGS/runtime.o += -O1
|
||||
OPT_CFLAGS/synchronizer.o += -O1
|
||||
endif
|
||||
|
||||
|
||||
# If you set HOTSPARC_GENERIC=yes, you disable all OPT_CFLAGS settings
|
||||
CFLAGS$(HOTSPARC_GENERIC) += $(OPT_CFLAGS/BYFILE)
|
||||
|
||||
# Set the environment variable HOTSPARC_GENERIC to "true"
|
||||
# to inhibit the effect of the previous line on CFLAGS.
|
||||
|
||||
# Linker mapfile
|
||||
MAPFILE = $(GAMMADIR)/make/aix/makefiles/mapfile-vers-debug
|
||||
|
||||
# xlc 10.1 parameters for ipa linkage.
|
||||
# - remove ipa linkage altogether. Does not seem to benefit performance,
|
||||
# but increases code footprint.
|
||||
# - this is a debug build in the end. Extra effort for ipa linkage is thus
|
||||
# not justified.
|
||||
LFLAGS_QIPA=
|
||||
|
||||
G_SUFFIX = _g
|
||||
VERSION = optimized
|
||||
SYSDEFS += -DASSERT -DFASTDEBUG
|
||||
PICFLAGS = DEFAULT
|
87
hotspot/make/aix/makefiles/jsig.make
Normal file
87
hotspot/make/aix/makefiles/jsig.make
Normal file
@ -0,0 +1,87 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Rules to build signal interposition library, used by vm.make
|
||||
|
||||
# libjsig.so: signal interposition library
|
||||
JSIG = jsig
|
||||
LIBJSIG = lib$(JSIG).so
|
||||
|
||||
LIBJSIG_DEBUGINFO = lib$(JSIG).debuginfo
|
||||
LIBJSIG_DIZ = lib$(JSIG).diz
|
||||
|
||||
JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm
|
||||
|
||||
DEST_JSIG = $(JDK_LIBDIR)/$(LIBJSIG)
|
||||
DEST_JSIG_DEBUGINFO = $(JDK_LIBDIR)/$(LIBJSIG_DEBUGINFO)
|
||||
DEST_JSIG_DIZ = $(JDK_LIBDIR)/$(LIBJSIG_DIZ)
|
||||
|
||||
LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
|
||||
|
||||
# On Linux we really dont want a mapfile, as this library is small
|
||||
# and preloaded using LD_PRELOAD, making functions private will
|
||||
# cause problems with interposing. See CR: 6466665
|
||||
# LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
|
||||
|
||||
LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE)
|
||||
|
||||
LFLAGS_JSIG += $(BIN_UTILS)
|
||||
|
||||
# DEBUG_BINARIES overrides everything, use full -g debug information
|
||||
ifeq ($(DEBUG_BINARIES), true)
|
||||
JSIG_DEBUG_CFLAGS = -g
|
||||
endif
|
||||
|
||||
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
|
||||
@echo Making signal interposition lib...
|
||||
$(QUIETLY) $(CXX) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
|
||||
$(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl
|
||||
|
||||
#ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
# $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
|
||||
# $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
|
||||
# ifeq ($(STRIP_POLICY),all_strip)
|
||||
# $(QUIETLY) $(STRIP) $@
|
||||
# else
|
||||
# ifeq ($(STRIP_POLICY),min_strip)
|
||||
# $(QUIETLY) $(STRIP) -g $@
|
||||
# # implied else here is no stripping at all
|
||||
# endif
|
||||
# endif
|
||||
# ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||
# $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO)
|
||||
# $(RM) $(LIBJSIG_DEBUGINFO)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
install_jsig: $(LIBJSIG)
|
||||
@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
|
||||
$(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \
|
||||
cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
|
||||
$(QUIETLY) test -f $(LIBJSIG_DIZ) && \
|
||||
cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
|
||||
|
||||
.PHONY: install_jsig
|
118
hotspot/make/aix/makefiles/jvmti.make
Normal file
118
hotspot/make/aix/makefiles/jvmti.make
Normal file
@ -0,0 +1,118 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# This makefile (jvmti.make) is included from the jvmti.make in the
|
||||
# build directories.
|
||||
#
|
||||
# It knows how to build and run the tools to generate jvmti.
|
||||
|
||||
include $(GAMMADIR)/make/aix/makefiles/rules.make
|
||||
|
||||
# #########################################################################
|
||||
|
||||
TOPDIR = $(shell echo `pwd`)
|
||||
GENERATED = $(TOPDIR)/../generated
|
||||
JvmtiOutDir = $(GENERATED)/jvmtifiles
|
||||
|
||||
JvmtiSrcDir = $(GAMMADIR)/src/share/vm/prims
|
||||
InterpreterSrcDir = $(GAMMADIR)/src/share/vm/interpreter
|
||||
|
||||
# set VPATH so make knows where to look for source files
|
||||
Src_Dirs_V += $(JvmtiSrcDir)
|
||||
VPATH += $(Src_Dirs_V:%=%:)
|
||||
|
||||
JvmtiGeneratedNames = \
|
||||
jvmtiEnv.hpp \
|
||||
jvmtiEnter.cpp \
|
||||
jvmtiEnterTrace.cpp \
|
||||
jvmtiEnvRecommended.cpp \
|
||||
bytecodeInterpreterWithChecks.cpp \
|
||||
jvmti.h \
|
||||
|
||||
JvmtiEnvFillSource = $(JvmtiSrcDir)/jvmtiEnvFill.java
|
||||
JvmtiEnvFillClass = $(JvmtiOutDir)/jvmtiEnvFill.class
|
||||
|
||||
JvmtiGenSource = $(JvmtiSrcDir)/jvmtiGen.java
|
||||
JvmtiGenClass = $(JvmtiOutDir)/jvmtiGen.class
|
||||
|
||||
JvmtiGeneratedFiles = $(JvmtiGeneratedNames:%=$(JvmtiOutDir)/%)
|
||||
|
||||
XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen
|
||||
|
||||
.PHONY: all jvmtidocs clean cleanall
|
||||
|
||||
# #########################################################################
|
||||
|
||||
all: $(JvmtiGeneratedFiles)
|
||||
|
||||
both = $(JvmtiGenClass) $(JvmtiSrcDir)/jvmti.xml $(JvmtiSrcDir)/jvmtiLib.xsl
|
||||
|
||||
$(JvmtiGenClass): $(JvmtiGenSource)
|
||||
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiGenSource)
|
||||
|
||||
$(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
|
||||
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
|
||||
|
||||
$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
|
||||
@echo Generating $@
|
||||
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnter.cpp -PARAM interface jvmti
|
||||
|
||||
$(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp: $(JvmtiGenClass) $(InterpreterSrcDir)/bytecodeInterpreter.cpp $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl
|
||||
@echo Generating $@
|
||||
$(XSLT) -IN $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xml -XSL $(InterpreterSrcDir)/bytecodeInterpreterWithChecks.xsl -OUT $(JvmtiOutDir)/bytecodeInterpreterWithChecks.cpp
|
||||
|
||||
$(JvmtiOutDir)/jvmtiEnterTrace.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
|
||||
@echo Generating $@
|
||||
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnterTrace.cpp -PARAM interface jvmti -PARAM trace Trace
|
||||
|
||||
$(JvmtiOutDir)/jvmtiEnvRecommended.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnv.xsl $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiEnvFillClass)
|
||||
@echo Generating $@
|
||||
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnv.xsl -OUT $(JvmtiOutDir)/jvmtiEnvStub.cpp
|
||||
$(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiEnvFill $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiOutDir)/jvmtiEnvStub.cpp $(JvmtiOutDir)/jvmtiEnvRecommended.cpp
|
||||
|
||||
$(JvmtiOutDir)/jvmtiEnv.hpp: $(both) $(JvmtiSrcDir)/jvmtiHpp.xsl
|
||||
@echo Generating $@
|
||||
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiHpp.xsl -OUT $(JvmtiOutDir)/jvmtiEnv.hpp
|
||||
|
||||
$(JvmtiOutDir)/jvmti.h: $(both) $(JvmtiSrcDir)/jvmtiH.xsl
|
||||
@echo Generating $@
|
||||
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiH.xsl -OUT $(JvmtiOutDir)/jvmti.h
|
||||
|
||||
jvmtidocs: $(JvmtiOutDir)/jvmti.html
|
||||
|
||||
$(JvmtiOutDir)/jvmti.html: $(both) $(JvmtiSrcDir)/jvmti.xsl
|
||||
@echo Generating $@
|
||||
$(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmti.xsl -OUT $(JvmtiOutDir)/jvmti.html
|
||||
|
||||
# #########################################################################
|
||||
|
||||
clean :
|
||||
rm $(JvmtiGenClass) $(JvmtiEnvFillClass) $(JvmtiGeneratedFiles)
|
||||
|
||||
cleanall :
|
||||
rm $(JvmtiGenClass) $(JvmtiEnvFillClass) $(JvmtiGeneratedFiles)
|
||||
|
||||
# #########################################################################
|
||||
|
274
hotspot/make/aix/makefiles/mapfile-vers-debug
Normal file
274
hotspot/make/aix/makefiles/mapfile-vers-debug
Normal file
@ -0,0 +1,274 @@
|
||||
#
|
||||
# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Define public interface.
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
# JNI
|
||||
JNI_CreateJavaVM;
|
||||
JNI_GetCreatedJavaVMs;
|
||||
JNI_GetDefaultJavaVMInitArgs;
|
||||
|
||||
# JVM
|
||||
JVM_Accept;
|
||||
JVM_ActiveProcessorCount;
|
||||
JVM_AllocateNewArray;
|
||||
JVM_AllocateNewObject;
|
||||
JVM_ArrayCopy;
|
||||
JVM_AssertionStatusDirectives;
|
||||
JVM_Available;
|
||||
JVM_Bind;
|
||||
JVM_ClassDepth;
|
||||
JVM_ClassLoaderDepth;
|
||||
JVM_Clone;
|
||||
JVM_Close;
|
||||
JVM_CX8Field;
|
||||
JVM_CompileClass;
|
||||
JVM_CompileClasses;
|
||||
JVM_CompilerCommand;
|
||||
JVM_Connect;
|
||||
JVM_ConstantPoolGetClassAt;
|
||||
JVM_ConstantPoolGetClassAtIfLoaded;
|
||||
JVM_ConstantPoolGetDoubleAt;
|
||||
JVM_ConstantPoolGetFieldAt;
|
||||
JVM_ConstantPoolGetFieldAtIfLoaded;
|
||||
JVM_ConstantPoolGetFloatAt;
|
||||
JVM_ConstantPoolGetIntAt;
|
||||
JVM_ConstantPoolGetLongAt;
|
||||
JVM_ConstantPoolGetMethodAt;
|
||||
JVM_ConstantPoolGetMethodAtIfLoaded;
|
||||
JVM_ConstantPoolGetMemberRefInfoAt;
|
||||
JVM_ConstantPoolGetSize;
|
||||
JVM_ConstantPoolGetStringAt;
|
||||
JVM_ConstantPoolGetUTF8At;
|
||||
JVM_CountStackFrames;
|
||||
JVM_CurrentClassLoader;
|
||||
JVM_CurrentLoadedClass;
|
||||
JVM_CurrentThread;
|
||||
JVM_CurrentTimeMillis;
|
||||
JVM_DefineClass;
|
||||
JVM_DefineClassWithSource;
|
||||
JVM_DefineClassWithSourceCond;
|
||||
JVM_DesiredAssertionStatus;
|
||||
JVM_DisableCompiler;
|
||||
JVM_DoPrivileged;
|
||||
JVM_DTraceGetVersion;
|
||||
JVM_DTraceActivate;
|
||||
JVM_DTraceIsProbeEnabled;
|
||||
JVM_DTraceIsSupported;
|
||||
JVM_DTraceDispose;
|
||||
JVM_DumpAllStacks;
|
||||
JVM_DumpThreads;
|
||||
JVM_EnableCompiler;
|
||||
JVM_Exit;
|
||||
JVM_FillInStackTrace;
|
||||
JVM_FindClassFromClass;
|
||||
JVM_FindClassFromClassLoader;
|
||||
JVM_FindClassFromBootLoader;
|
||||
JVM_FindLibraryEntry;
|
||||
JVM_FindLoadedClass;
|
||||
JVM_FindPrimitiveClass;
|
||||
JVM_FindSignal;
|
||||
JVM_FreeMemory;
|
||||
JVM_GC;
|
||||
JVM_GetAllThreads;
|
||||
JVM_GetArrayElement;
|
||||
JVM_GetArrayLength;
|
||||
JVM_GetCPClassNameUTF;
|
||||
JVM_GetCPFieldClassNameUTF;
|
||||
JVM_GetCPFieldModifiers;
|
||||
JVM_GetCPFieldNameUTF;
|
||||
JVM_GetCPFieldSignatureUTF;
|
||||
JVM_GetCPMethodClassNameUTF;
|
||||
JVM_GetCPMethodModifiers;
|
||||
JVM_GetCPMethodNameUTF;
|
||||
JVM_GetCPMethodSignatureUTF;
|
||||
JVM_GetCallerClass;
|
||||
JVM_GetClassAccessFlags;
|
||||
JVM_GetClassAnnotations;
|
||||
JVM_GetClassCPEntriesCount;
|
||||
JVM_GetClassCPTypes;
|
||||
JVM_GetClassConstantPool;
|
||||
JVM_GetClassContext;
|
||||
JVM_GetClassDeclaredConstructors;
|
||||
JVM_GetClassDeclaredFields;
|
||||
JVM_GetClassDeclaredMethods;
|
||||
JVM_GetClassFieldsCount;
|
||||
JVM_GetClassInterfaces;
|
||||
JVM_GetClassLoader;
|
||||
JVM_GetClassMethodsCount;
|
||||
JVM_GetClassModifiers;
|
||||
JVM_GetClassName;
|
||||
JVM_GetClassNameUTF;
|
||||
JVM_GetClassSignature;
|
||||
JVM_GetClassSigners;
|
||||
JVM_GetClassTypeAnnotations;
|
||||
JVM_GetComponentType;
|
||||
JVM_GetDeclaredClasses;
|
||||
JVM_GetDeclaringClass;
|
||||
JVM_GetEnclosingMethodInfo;
|
||||
JVM_GetFieldAnnotations;
|
||||
JVM_GetFieldIxModifiers;
|
||||
JVM_GetFieldTypeAnnotations;
|
||||
JVM_GetHostName;
|
||||
JVM_GetInheritedAccessControlContext;
|
||||
JVM_GetInterfaceVersion;
|
||||
JVM_GetLastErrorString;
|
||||
JVM_GetManagement;
|
||||
JVM_GetMethodAnnotations;
|
||||
JVM_GetMethodDefaultAnnotationValue;
|
||||
JVM_GetMethodIxArgsSize;
|
||||
JVM_GetMethodIxByteCode;
|
||||
JVM_GetMethodIxByteCodeLength;
|
||||
JVM_GetMethodIxExceptionIndexes;
|
||||
JVM_GetMethodIxExceptionTableEntry;
|
||||
JVM_GetMethodIxExceptionTableLength;
|
||||
JVM_GetMethodIxExceptionsCount;
|
||||
JVM_GetMethodIxLocalsCount;
|
||||
JVM_GetMethodIxMaxStack;
|
||||
JVM_GetMethodIxModifiers;
|
||||
JVM_GetMethodIxNameUTF;
|
||||
JVM_GetMethodIxSignatureUTF;
|
||||
JVM_GetMethodParameterAnnotations;
|
||||
JVM_GetMethodParameters;
|
||||
JVM_GetMethodTypeAnnotations;
|
||||
JVM_GetPrimitiveArrayElement;
|
||||
JVM_GetProtectionDomain;
|
||||
JVM_GetSockName;
|
||||
JVM_GetSockOpt;
|
||||
JVM_GetStackAccessControlContext;
|
||||
JVM_GetStackTraceDepth;
|
||||
JVM_GetStackTraceElement;
|
||||
JVM_GetSystemPackage;
|
||||
JVM_GetSystemPackages;
|
||||
JVM_GetThreadStateNames;
|
||||
JVM_GetThreadStateValues;
|
||||
JVM_GetVersionInfo;
|
||||
JVM_Halt;
|
||||
JVM_HoldsLock;
|
||||
JVM_IHashCode;
|
||||
JVM_InitAgentProperties;
|
||||
JVM_InitProperties;
|
||||
JVM_InitializeCompiler;
|
||||
JVM_InitializeSocketLibrary;
|
||||
JVM_InternString;
|
||||
JVM_Interrupt;
|
||||
JVM_InvokeMethod;
|
||||
JVM_IsArrayClass;
|
||||
JVM_IsConstructorIx;
|
||||
JVM_IsInterface;
|
||||
JVM_IsInterrupted;
|
||||
JVM_IsNaN;
|
||||
JVM_IsPrimitiveClass;
|
||||
JVM_IsSameClassPackage;
|
||||
JVM_IsSilentCompiler;
|
||||
JVM_IsSupportedJNIVersion;
|
||||
JVM_IsThreadAlive;
|
||||
JVM_IsVMGeneratedMethodIx;
|
||||
JVM_LatestUserDefinedLoader;
|
||||
JVM_Listen;
|
||||
JVM_LoadClass0;
|
||||
JVM_LoadLibrary;
|
||||
JVM_Lseek;
|
||||
JVM_MaxObjectInspectionAge;
|
||||
JVM_MaxMemory;
|
||||
JVM_MonitorNotify;
|
||||
JVM_MonitorNotifyAll;
|
||||
JVM_MonitorWait;
|
||||
JVM_NanoTime;
|
||||
JVM_NativePath;
|
||||
JVM_NewArray;
|
||||
JVM_NewInstanceFromConstructor;
|
||||
JVM_NewMultiArray;
|
||||
JVM_OnExit;
|
||||
JVM_Open;
|
||||
JVM_RaiseSignal;
|
||||
JVM_RawMonitorCreate;
|
||||
JVM_RawMonitorDestroy;
|
||||
JVM_RawMonitorEnter;
|
||||
JVM_RawMonitorExit;
|
||||
JVM_Read;
|
||||
JVM_Recv;
|
||||
JVM_RecvFrom;
|
||||
JVM_RegisterSignal;
|
||||
JVM_ReleaseUTF;
|
||||
JVM_ResolveClass;
|
||||
JVM_ResumeThread;
|
||||
JVM_Send;
|
||||
JVM_SendTo;
|
||||
JVM_SetArrayElement;
|
||||
JVM_SetClassSigners;
|
||||
JVM_SetLength;
|
||||
JVM_SetNativeThreadName;
|
||||
JVM_SetPrimitiveArrayElement;
|
||||
JVM_SetProtectionDomain;
|
||||
JVM_SetSockOpt;
|
||||
JVM_SetThreadPriority;
|
||||
JVM_Sleep;
|
||||
JVM_Socket;
|
||||
JVM_SocketAvailable;
|
||||
JVM_SocketClose;
|
||||
JVM_SocketShutdown;
|
||||
JVM_StartThread;
|
||||
JVM_StopThread;
|
||||
JVM_SuspendThread;
|
||||
JVM_SupportsCX8;
|
||||
JVM_Sync;
|
||||
JVM_Timeout;
|
||||
JVM_TotalMemory;
|
||||
JVM_TraceInstructions;
|
||||
JVM_TraceMethodCalls;
|
||||
JVM_UnloadLibrary;
|
||||
JVM_Write;
|
||||
JVM_Yield;
|
||||
JVM_handle_linux_signal;
|
||||
|
||||
# debug JVM
|
||||
JVM_AccessVMBooleanFlag;
|
||||
JVM_AccessVMIntFlag;
|
||||
JVM_VMBreakPoint;
|
||||
|
||||
# miscellaneous functions
|
||||
jio_fprintf;
|
||||
jio_printf;
|
||||
jio_snprintf;
|
||||
jio_vfprintf;
|
||||
jio_vsnprintf;
|
||||
fork1;
|
||||
numa_warn;
|
||||
numa_error;
|
||||
|
||||
# Needed because there is no JVM interface for this.
|
||||
sysThreadAvailableStackWithSlack;
|
||||
|
||||
# This is for Forte Analyzer profiling support.
|
||||
AsyncGetCallTrace;
|
||||
|
||||
# INSERT VTABLE SYMBOLS HERE
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
38
hotspot/make/aix/makefiles/mapfile-vers-jsig
Normal file
38
hotspot/make/aix/makefiles/mapfile-vers-jsig
Normal file
@ -0,0 +1,38 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Define library interface.
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
JVM_begin_signal_setting;
|
||||
JVM_end_signal_setting;
|
||||
JVM_get_libjsig_version;
|
||||
JVM_get_signal_action;
|
||||
sigaction;
|
||||
signal;
|
||||
sigset;
|
||||
local:
|
||||
*;
|
||||
};
|
267
hotspot/make/aix/makefiles/mapfile-vers-product
Normal file
267
hotspot/make/aix/makefiles/mapfile-vers-product
Normal file
@ -0,0 +1,267 @@
|
||||
#
|
||||
# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Define public interface.
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
# JNI
|
||||
JNI_CreateJavaVM;
|
||||
JNI_GetCreatedJavaVMs;
|
||||
JNI_GetDefaultJavaVMInitArgs;
|
||||
|
||||
# JVM
|
||||
JVM_Accept;
|
||||
JVM_ActiveProcessorCount;
|
||||
JVM_AllocateNewArray;
|
||||
JVM_AllocateNewObject;
|
||||
JVM_ArrayCopy;
|
||||
JVM_AssertionStatusDirectives;
|
||||
JVM_Available;
|
||||
JVM_Bind;
|
||||
JVM_ClassDepth;
|
||||
JVM_ClassLoaderDepth;
|
||||
JVM_Clone;
|
||||
JVM_Close;
|
||||
JVM_CX8Field;
|
||||
JVM_CompileClass;
|
||||
JVM_CompileClasses;
|
||||
JVM_CompilerCommand;
|
||||
JVM_Connect;
|
||||
JVM_ConstantPoolGetClassAt;
|
||||
JVM_ConstantPoolGetClassAtIfLoaded;
|
||||
JVM_ConstantPoolGetDoubleAt;
|
||||
JVM_ConstantPoolGetFieldAt;
|
||||
JVM_ConstantPoolGetFieldAtIfLoaded;
|
||||
JVM_ConstantPoolGetFloatAt;
|
||||
JVM_ConstantPoolGetIntAt;
|
||||
JVM_ConstantPoolGetLongAt;
|
||||
JVM_ConstantPoolGetMethodAt;
|
||||
JVM_ConstantPoolGetMethodAtIfLoaded;
|
||||
JVM_ConstantPoolGetMemberRefInfoAt;
|
||||
JVM_ConstantPoolGetSize;
|
||||
JVM_ConstantPoolGetStringAt;
|
||||
JVM_ConstantPoolGetUTF8At;
|
||||
JVM_CountStackFrames;
|
||||
JVM_CurrentClassLoader;
|
||||
JVM_CurrentLoadedClass;
|
||||
JVM_CurrentThread;
|
||||
JVM_CurrentTimeMillis;
|
||||
JVM_DefineClass;
|
||||
JVM_DefineClassWithSource;
|
||||
JVM_DefineClassWithSourceCond;
|
||||
JVM_DesiredAssertionStatus;
|
||||
JVM_DisableCompiler;
|
||||
JVM_DoPrivileged;
|
||||
JVM_DTraceGetVersion;
|
||||
JVM_DTraceActivate;
|
||||
JVM_DTraceIsProbeEnabled;
|
||||
JVM_DTraceIsSupported;
|
||||
JVM_DTraceDispose;
|
||||
JVM_DumpAllStacks;
|
||||
JVM_DumpThreads;
|
||||
JVM_EnableCompiler;
|
||||
JVM_Exit;
|
||||
JVM_FillInStackTrace;
|
||||
JVM_FindClassFromClass;
|
||||
JVM_FindClassFromClassLoader;
|
||||
JVM_FindClassFromBootLoader;
|
||||
JVM_FindLibraryEntry;
|
||||
JVM_FindLoadedClass;
|
||||
JVM_FindPrimitiveClass;
|
||||
JVM_FindSignal;
|
||||
JVM_FreeMemory;
|
||||
JVM_GC;
|
||||
JVM_GetAllThreads;
|
||||
JVM_GetArrayElement;
|
||||
JVM_GetArrayLength;
|
||||
JVM_GetCPClassNameUTF;
|
||||
JVM_GetCPFieldClassNameUTF;
|
||||
JVM_GetCPFieldModifiers;
|
||||
JVM_GetCPFieldNameUTF;
|
||||
JVM_GetCPFieldSignatureUTF;
|
||||
JVM_GetCPMethodClassNameUTF;
|
||||
JVM_GetCPMethodModifiers;
|
||||
JVM_GetCPMethodNameUTF;
|
||||
JVM_GetCPMethodSignatureUTF;
|
||||
JVM_GetCallerClass;
|
||||
JVM_GetClassAccessFlags;
|
||||
JVM_GetClassAnnotations;
|
||||
JVM_GetClassCPEntriesCount;
|
||||
JVM_GetClassCPTypes;
|
||||
JVM_GetClassConstantPool;
|
||||
JVM_GetClassContext;
|
||||
JVM_GetClassDeclaredConstructors;
|
||||
JVM_GetClassDeclaredFields;
|
||||
JVM_GetClassDeclaredMethods;
|
||||
JVM_GetClassFieldsCount;
|
||||
JVM_GetClassInterfaces;
|
||||
JVM_GetClassLoader;
|
||||
JVM_GetClassMethodsCount;
|
||||
JVM_GetClassModifiers;
|
||||
JVM_GetClassName;
|
||||
JVM_GetClassNameUTF;
|
||||
JVM_GetClassSignature;
|
||||
JVM_GetClassSigners;
|
||||
JVM_GetClassTypeAnnotations;
|
||||
JVM_GetComponentType;
|
||||
JVM_GetDeclaredClasses;
|
||||
JVM_GetDeclaringClass;
|
||||
JVM_GetEnclosingMethodInfo;
|
||||
JVM_GetFieldAnnotations;
|
||||
JVM_GetFieldIxModifiers;
|
||||
JVM_GetHostName;
|
||||
JVM_GetInheritedAccessControlContext;
|
||||
JVM_GetInterfaceVersion;
|
||||
JVM_GetLastErrorString;
|
||||
JVM_GetManagement;
|
||||
JVM_GetMethodAnnotations;
|
||||
JVM_GetMethodDefaultAnnotationValue;
|
||||
JVM_GetMethodIxArgsSize;
|
||||
JVM_GetMethodIxByteCode;
|
||||
JVM_GetMethodIxByteCodeLength;
|
||||
JVM_GetMethodIxExceptionIndexes;
|
||||
JVM_GetMethodIxExceptionTableEntry;
|
||||
JVM_GetMethodIxExceptionTableLength;
|
||||
JVM_GetMethodIxExceptionsCount;
|
||||
JVM_GetMethodIxLocalsCount;
|
||||
JVM_GetMethodIxMaxStack;
|
||||
JVM_GetMethodIxModifiers;
|
||||
JVM_GetMethodIxNameUTF;
|
||||
JVM_GetMethodIxSignatureUTF;
|
||||
JVM_GetMethodParameterAnnotations;
|
||||
JVM_GetMethodParameters;
|
||||
JVM_GetPrimitiveArrayElement;
|
||||
JVM_GetProtectionDomain;
|
||||
JVM_GetSockName;
|
||||
JVM_GetSockOpt;
|
||||
JVM_GetStackAccessControlContext;
|
||||
JVM_GetStackTraceDepth;
|
||||
JVM_GetStackTraceElement;
|
||||
JVM_GetSystemPackage;
|
||||
JVM_GetSystemPackages;
|
||||
JVM_GetThreadStateNames;
|
||||
JVM_GetThreadStateValues;
|
||||
JVM_GetVersionInfo;
|
||||
JVM_Halt;
|
||||
JVM_HoldsLock;
|
||||
JVM_IHashCode;
|
||||
JVM_InitAgentProperties;
|
||||
JVM_InitProperties;
|
||||
JVM_InitializeCompiler;
|
||||
JVM_InitializeSocketLibrary;
|
||||
JVM_InternString;
|
||||
JVM_Interrupt;
|
||||
JVM_InvokeMethod;
|
||||
JVM_IsArrayClass;
|
||||
JVM_IsConstructorIx;
|
||||
JVM_IsInterface;
|
||||
JVM_IsInterrupted;
|
||||
JVM_IsNaN;
|
||||
JVM_IsPrimitiveClass;
|
||||
JVM_IsSameClassPackage;
|
||||
JVM_IsSilentCompiler;
|
||||
JVM_IsSupportedJNIVersion;
|
||||
JVM_IsThreadAlive;
|
||||
JVM_IsVMGeneratedMethodIx;
|
||||
JVM_LatestUserDefinedLoader;
|
||||
JVM_Listen;
|
||||
JVM_LoadClass0;
|
||||
JVM_LoadLibrary;
|
||||
JVM_Lseek;
|
||||
JVM_MaxObjectInspectionAge;
|
||||
JVM_MaxMemory;
|
||||
JVM_MonitorNotify;
|
||||
JVM_MonitorNotifyAll;
|
||||
JVM_MonitorWait;
|
||||
JVM_NanoTime;
|
||||
JVM_NativePath;
|
||||
JVM_NewArray;
|
||||
JVM_NewInstanceFromConstructor;
|
||||
JVM_NewMultiArray;
|
||||
JVM_OnExit;
|
||||
JVM_Open;
|
||||
JVM_RaiseSignal;
|
||||
JVM_RawMonitorCreate;
|
||||
JVM_RawMonitorDestroy;
|
||||
JVM_RawMonitorEnter;
|
||||
JVM_RawMonitorExit;
|
||||
JVM_Read;
|
||||
JVM_Recv;
|
||||
JVM_RecvFrom;
|
||||
JVM_RegisterSignal;
|
||||
JVM_ReleaseUTF;
|
||||
JVM_ResolveClass;
|
||||
JVM_ResumeThread;
|
||||
JVM_Send;
|
||||
JVM_SendTo;
|
||||
JVM_SetArrayElement;
|
||||
JVM_SetClassSigners;
|
||||
JVM_SetLength;
|
||||
JVM_SetNativeThreadName;
|
||||
JVM_SetPrimitiveArrayElement;
|
||||
JVM_SetProtectionDomain;
|
||||
JVM_SetSockOpt;
|
||||
JVM_SetThreadPriority;
|
||||
JVM_Sleep;
|
||||
JVM_Socket;
|
||||
JVM_SocketAvailable;
|
||||
JVM_SocketClose;
|
||||
JVM_SocketShutdown;
|
||||
JVM_StartThread;
|
||||
JVM_StopThread;
|
||||
JVM_SuspendThread;
|
||||
JVM_SupportsCX8;
|
||||
JVM_Sync;
|
||||
JVM_Timeout;
|
||||
JVM_TotalMemory;
|
||||
JVM_TraceInstructions;
|
||||
JVM_TraceMethodCalls;
|
||||
JVM_UnloadLibrary;
|
||||
JVM_Write;
|
||||
JVM_Yield;
|
||||
JVM_handle_linux_signal;
|
||||
|
||||
# miscellaneous functions
|
||||
jio_fprintf;
|
||||
jio_printf;
|
||||
jio_snprintf;
|
||||
jio_vfprintf;
|
||||
jio_vsnprintf;
|
||||
fork1;
|
||||
numa_warn;
|
||||
numa_error;
|
||||
|
||||
# Needed because there is no JVM interface for this.
|
||||
sysThreadAvailableStackWithSlack;
|
||||
|
||||
# This is for Forte Analyzer profiling support.
|
||||
AsyncGetCallTrace;
|
||||
|
||||
# INSERT VTABLE SYMBOLS HERE
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
94
hotspot/make/aix/makefiles/ppc64.make
Normal file
94
hotspot/make/aix/makefiles/ppc64.make
Normal file
@ -0,0 +1,94 @@
|
||||
#
|
||||
# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Produce 64 bits object files.
|
||||
CFLAGS += -q64
|
||||
|
||||
# Balanced tuning for recent versions of the POWER architecture (if supported by xlc).
|
||||
QTUNE=$(if $(CXX_SUPPORTS_BALANCED_TUNING),balanced,pwr5)
|
||||
|
||||
# Try to speed up the interpreter: use ppc64 instructions and inline
|
||||
# glue code for external functions.
|
||||
OPT_CFLAGS += -qarch=ppc64 -qtune=$(QTUNE) -qinlglue
|
||||
|
||||
# We need variable length arrays
|
||||
CFLAGS += -qlanglvl=c99vla
|
||||
# Just to check for unwanted macro redefinitions
|
||||
CFLAGS += -qlanglvl=noredefmac
|
||||
|
||||
# Suppress those "implicit private" warnings xlc gives.
|
||||
# - The omitted keyword "private" is assumed for base class "...".
|
||||
CFLAGS += -qsuppress=1540-0198
|
||||
|
||||
# Suppress the following numerous warning:
|
||||
# - 1540-1090 (I) The destructor of "..." might not be called.
|
||||
# - 1500-010: (W) WARNING in ...: Infinite loop. Program may not stop.
|
||||
# There are several infinite loops in the vm, suppress.
|
||||
CFLAGS += -qsuppress=1540-1090 -qsuppress=1500-010
|
||||
|
||||
# Suppress
|
||||
# - 540-1088 (W) The exception specification is being ignored.
|
||||
# caused by throw() in declaration of new() in nmethod.hpp.
|
||||
CFLAGS += -qsuppress=1540-1088
|
||||
|
||||
# Turn off floating-point optimizations that may alter program semantics
|
||||
OPT_CFLAGS += -qstrict
|
||||
|
||||
# Disable aggressive optimizations for functions in sharedRuntimeTrig.cpp
|
||||
# and sharedRuntimeTrans.cpp on ppc64.
|
||||
# -qstrict turns off the following optimizations:
|
||||
# * Performing code motion and scheduling on computations such as loads
|
||||
# and floating-point computations that may trigger an exception.
|
||||
# * Relaxing conformance to IEEE rules.
|
||||
# * Reassociating floating-point expressions.
|
||||
# When using '-qstrict' there still remains one problem
|
||||
# in javasoft.sqe.tests.api.java.lang.Math.sin5Tests when run in compile-all
|
||||
# mode, so don't optimize sharedRuntimeTrig.cpp at all.
|
||||
OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
|
||||
OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
|
||||
|
||||
# xlc 10.01 parameters for ipa compile.
|
||||
QIPA_COMPILE=$(if $(CXX_IS_V10),-qipa)
|
||||
|
||||
# Xlc 10.1 parameters for aggressive optimization:
|
||||
# - qhot=level=1: Most aggressive loop optimizations.
|
||||
# - qignerrno: Assume errno is not modified by system calls.
|
||||
# - qinline: Inline method calls. No suboptions for c++ compiles.
|
||||
# - qxflag=ASMMIDCOALFIX: Activate fix for -O3 problem in interpreter loop.
|
||||
# - qxflag=asmfastsync: Activate fix for performance problem with inline assembler with memory clobber.
|
||||
QV10_OPT=$(if $(CXX_IS_V10),-qxflag=ASMMIDCOALFIX -qxflag=asmfastsync)
|
||||
QV10_OPT_AGGRESSIVE=$(if $(CXX_IS_V10),-qhot=level=1 -qignerrno -qinline)
|
||||
QV10_OPT_CONSERVATIVE=$(if $(CXX_IS_V10),-qhot=level=1 -qignerrno -qinline)
|
||||
|
||||
# Disallow inlining for synchronizer.cpp, but perform O3 optimizations.
|
||||
OPT_CFLAGS/synchronizer.o = $(OPT_CFLAGS) -qnoinline
|
||||
|
||||
# Set all the xlC V10.1 options here.
|
||||
OPT_CFLAGS += $(QIPA_COMPILE) $(QV10_OPT) $(QV10_OPT_AGGRESSIVE)
|
||||
|
||||
export OBJECT_MODE=64
|
||||
|
||||
# Also build launcher as 64 bit executable.
|
||||
LAUNCHERFLAGS += -q64
|
58
hotspot/make/aix/makefiles/product.make
Normal file
58
hotspot/make/aix/makefiles/product.make
Normal file
@ -0,0 +1,58 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
|
||||
OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
|
||||
|
||||
# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
|
||||
|
||||
# If you set HOTSPARC_GENERIC=yes, you disable all OPT_CFLAGS settings
|
||||
CFLAGS$(HOTSPARC_GENERIC) += $(OPT_CFLAGS/BYFILE)
|
||||
|
||||
# Set the environment variable HOTSPARC_GENERIC to "true"
|
||||
# to inhibit the effect of the previous line on CFLAGS.
|
||||
|
||||
# Linker mapfile
|
||||
MAPFILE = $(GAMMADIR)/make/aix/makefiles/mapfile-vers-product
|
||||
|
||||
# Remove ipa linkage altogether. Does not seem to benfit performance, but increases code footprint.
|
||||
LFLAGS_QIPA=
|
||||
|
||||
SYSDEFS += -DPRODUCT
|
||||
VERSION = optimized
|
||||
|
||||
# use -g to strip library as -x will discard its symbol table; -x is fine for
|
||||
# executables.
|
||||
# Note: these macros are not used in .debuginfo configs
|
||||
STRIP_LIBJVM = $(STRIP) -g $@ || exit 1;
|
||||
STRIP_AOUT = $(STRIP) -x $@ || exit 1;
|
||||
|
||||
# If we can create .debuginfo files, then the VM is stripped in vm.make
|
||||
# and this macro is not used.
|
||||
# LINK_LIB.CXX/POST_HOOK += $(STRIP_$(LINK_INTO))
|
203
hotspot/make/aix/makefiles/rules.make
Normal file
203
hotspot/make/aix/makefiles/rules.make
Normal file
@ -0,0 +1,203 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Common rules/macros for the vm, adlc.
|
||||
|
||||
# Tell make that .cpp is important
|
||||
.SUFFIXES: .cpp $(SUFFIXES)
|
||||
|
||||
DEMANGLER = c++filt
|
||||
DEMANGLE = $(DEMANGLER) < $@ > .$@ && mv -f .$@ $@
|
||||
|
||||
# $(CC) is the c compiler (cc/gcc), $(CXX) is the c++ compiler (CC/g++).
|
||||
CC_COMPILE = $(CC) $(CXXFLAGS) $(CFLAGS)
|
||||
CXX_COMPILE = $(CXX) $(CXXFLAGS) $(CFLAGS)
|
||||
|
||||
AS.S = $(AS) $(ASFLAGS)
|
||||
|
||||
COMPILE.CC = $(CC_COMPILE) -c
|
||||
GENASM.CC = $(CC_COMPILE) -S
|
||||
LINK.CC = $(CC) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS)
|
||||
LINK_LIB.CC = $(CC) $(LFLAGS) $(SHARED_FLAG)
|
||||
PREPROCESS.CC = $(CC_COMPILE) -E
|
||||
|
||||
COMPILE.CXX = $(CXX_COMPILE) -c
|
||||
GENASM.CXX = $(CXX_COMPILE) -S
|
||||
LINK.CXX = $(CXX) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS)
|
||||
LINK_NOPROF.CXX = $(CXX) $(LFLAGS) $(AOUT_FLAGS)
|
||||
LINK_LIB.CXX = $(CXX) $(LFLAGS) $(SHARED_FLAG)
|
||||
PREPROCESS.CXX = $(CXX_COMPILE) -E
|
||||
|
||||
# cross compiling the jvm with c2 requires host compilers to build
|
||||
# adlc tool
|
||||
|
||||
HOST.CXX_COMPILE = $(HOSTCXX) $(CXXFLAGS) $(CFLAGS)
|
||||
HOST.COMPILE.CXX = $(HOST.CXX_COMPILE) -c
|
||||
HOST.LINK_NOPROF.CXX = $(HOSTCXX) $(LFLAGS) $(AOUT_FLAGS)
|
||||
|
||||
|
||||
# Effect of REMOVE_TARGET is to delete out-of-date files during "gnumake -k".
|
||||
REMOVE_TARGET = rm -f $@
|
||||
|
||||
# Note use of ALT_BOOTDIR to explicitly specify location of java and
|
||||
# javac; this is the same environment variable used in the J2SE build
|
||||
# process for overriding the default spec, which is BOOTDIR.
|
||||
# Note also that we fall back to using JAVA_HOME if neither of these is
|
||||
# specified.
|
||||
|
||||
ifdef ALT_BOOTDIR
|
||||
|
||||
RUN.JAVA = $(ALT_BOOTDIR)/bin/java
|
||||
RUN.JAVAP = $(ALT_BOOTDIR)/bin/javap
|
||||
RUN.JAVAH = $(ALT_BOOTDIR)/bin/javah
|
||||
RUN.JAR = $(ALT_BOOTDIR)/bin/jar
|
||||
COMPILE.JAVAC = $(ALT_BOOTDIR)/bin/javac
|
||||
COMPILE.RMIC = $(ALT_BOOTDIR)/bin/rmic
|
||||
BOOT_JAVA_HOME = $(ALT_BOOTDIR)
|
||||
|
||||
else
|
||||
|
||||
ifdef BOOTDIR
|
||||
|
||||
RUN.JAVA = $(BOOTDIR)/bin/java
|
||||
RUN.JAVAP = $(BOOTDIR)/bin/javap
|
||||
RUN.JAVAH = $(BOOTDIR)/bin/javah
|
||||
RUN.JAR = $(BOOTDIR)/bin/jar
|
||||
COMPILE.JAVAC = $(BOOTDIR)/bin/javac
|
||||
COMPILE.RMIC = $(BOOTDIR)/bin/rmic
|
||||
BOOT_JAVA_HOME = $(BOOTDIR)
|
||||
|
||||
else
|
||||
|
||||
ifdef JAVA_HOME
|
||||
|
||||
RUN.JAVA = $(JAVA_HOME)/bin/java
|
||||
RUN.JAVAP = $(JAVA_HOME)/bin/javap
|
||||
RUN.JAVAH = $(JAVA_HOME)/bin/javah
|
||||
RUN.JAR = $(JAVA_HOME)/bin/jar
|
||||
COMPILE.JAVAC = $(JAVA_HOME)/bin/javac
|
||||
COMPILE.RMIC = $(JAVA_HOME)/bin/rmic
|
||||
BOOT_JAVA_HOME = $(JAVA_HOME)
|
||||
|
||||
else
|
||||
|
||||
# take from the PATH, if ALT_BOOTDIR, BOOTDIR and JAVA_HOME are not defined
|
||||
# note that this is to support hotspot build without SA. To build
|
||||
# SA along with hotspot, you need to define ALT_BOOTDIR, BOOTDIR or JAVA_HOME
|
||||
|
||||
RUN.JAVA = java
|
||||
RUN.JAVAP = javap
|
||||
RUN.JAVAH = javah
|
||||
RUN.JAR = jar
|
||||
COMPILE.JAVAC = javac
|
||||
COMPILE.RMIC = rmic
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
COMPILE.JAVAC += $(BOOTSTRAP_JAVAC_FLAGS)
|
||||
|
||||
SUM = /usr/bin/sum
|
||||
|
||||
# 'gmake MAKE_VERBOSE=y' gives all the gory details.
|
||||
QUIETLY$(MAKE_VERBOSE) = @
|
||||
RUN.JAR$(MAKE_VERBOSE) += >/dev/null
|
||||
|
||||
# Settings for javac
|
||||
BOOT_SOURCE_LANGUAGE_VERSION = 6
|
||||
BOOT_TARGET_CLASS_VERSION = 6
|
||||
JAVAC_FLAGS = -g -encoding ascii
|
||||
BOOTSTRAP_JAVAC_FLAGS = $(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
|
||||
|
||||
# With parallel makes, print a message at the end of compilation.
|
||||
ifeq ($(findstring j,$(MFLAGS)),j)
|
||||
COMPILE_DONE = && { echo Done with $<; }
|
||||
endif
|
||||
|
||||
# Include $(NONPIC_OBJ_FILES) definition
|
||||
ifndef LP64
|
||||
include $(GAMMADIR)/make/pic.make
|
||||
endif
|
||||
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
# The non-PIC object files are only generated for 32 bit platforms.
|
||||
ifdef LP64
|
||||
%.o: %.cpp
|
||||
@echo Compiling $<
|
||||
$(QUIETLY) $(REMOVE_TARGET)
|
||||
$(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
|
||||
else
|
||||
%.o: %.cpp
|
||||
@echo Compiling $<
|
||||
$(QUIETLY) $(REMOVE_TARGET)
|
||||
$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
|
||||
$(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \
|
||||
$(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE))
|
||||
endif
|
||||
|
||||
%.o: %.s
|
||||
@echo Assembling $<
|
||||
$(QUIETLY) $(REMOVE_TARGET)
|
||||
$(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
|
||||
|
||||
%.s: %.cpp
|
||||
@echo Generating assembly for $<
|
||||
$(QUIETLY) $(GENASM.CXX) -o $@ $<
|
||||
$(QUIETLY) $(DEMANGLE) $(COMPILE_DONE)
|
||||
|
||||
# Intermediate files (for debugging macros)
|
||||
%.i: %.cpp
|
||||
@echo Preprocessing $< to $@
|
||||
$(QUIETLY) $(PREPROCESS.CXX) $< > $@ $(COMPILE_DONE)
|
||||
|
||||
# Override gnumake built-in rules which do sccs get operations badly.
|
||||
# (They put the checked out code in the current directory, not in the
|
||||
# directory of the original file.) Since this is a symptom of a teamware
|
||||
# failure, and since not all problems can be detected by gnumake due
|
||||
# to incomplete dependency checking... just complain and stop.
|
||||
%:: s.%
|
||||
@echo "========================================================="
|
||||
@echo File $@
|
||||
@echo is out of date with respect to its SCCS file.
|
||||
@echo This file may be from an unresolved Teamware conflict.
|
||||
@echo This is also a symptom of a Teamware bringover/putback failure
|
||||
@echo in which SCCS files are updated but not checked out.
|
||||
@echo Check for other out of date files in your workspace.
|
||||
@echo "========================================================="
|
||||
@exit 666
|
||||
|
||||
%:: SCCS/s.%
|
||||
@echo "========================================================="
|
||||
@echo File $@
|
||||
@echo is out of date with respect to its SCCS file.
|
||||
@echo This file may be from an unresolved Teamware conflict.
|
||||
@echo This is also a symptom of a Teamware bringover/putback failure
|
||||
@echo in which SCCS files are updated but not checked out.
|
||||
@echo Check for other out of date files in your workspace.
|
||||
@echo "========================================================="
|
||||
@exit 666
|
||||
|
||||
.PHONY: default
|
116
hotspot/make/aix/makefiles/sa.make
Normal file
116
hotspot/make/aix/makefiles/sa.make
Normal file
@ -0,0 +1,116 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# This makefile (sa.make) is included from the sa.make in the
|
||||
# build directories.
|
||||
|
||||
# This makefile is used to build Serviceability Agent java code
|
||||
# and generate JNI header file for native methods.
|
||||
|
||||
include $(GAMMADIR)/make/aix/makefiles/rules.make
|
||||
|
||||
include $(GAMMADIR)/make/defs.make
|
||||
|
||||
AGENT_DIR = $(GAMMADIR)/agent
|
||||
|
||||
include $(GAMMADIR)/make/sa.files
|
||||
|
||||
TOPDIR = $(shell echo `pwd`)
|
||||
GENERATED = $(TOPDIR)/../generated
|
||||
|
||||
# tools.jar is needed by the JDI - SA binding
|
||||
SA_CLASSPATH = $(BOOT_JAVA_HOME)/lib/tools.jar
|
||||
|
||||
# TODO: if it's a modules image, check if SA module is installed.
|
||||
MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules
|
||||
|
||||
AGENT_FILES_LIST := $(GENERATED)/agent.classes.list
|
||||
|
||||
SA_CLASSDIR = $(GENERATED)/saclasses
|
||||
|
||||
SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
|
||||
|
||||
SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties
|
||||
|
||||
# if $(AGENT_DIR) does not exist, we don't build SA
|
||||
# also, we don't build SA on Itanium, PowerPC, ARM or zero.
|
||||
|
||||
all:
|
||||
if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" \
|
||||
-a "$(SRCARCH)" != "arm" \
|
||||
-a "$(SRCARCH)" != "ppc" \
|
||||
-a "$(SRCARCH)" != "zero" ] ; then \
|
||||
$(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \
|
||||
fi
|
||||
|
||||
$(GENERATED)/sa-jdi.jar: $(AGENT_FILES)
|
||||
$(QUIETLY) echo "Making $@"
|
||||
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
|
||||
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(QUIETLY) if [ ! -f $(SA_CLASSPATH) -a ! -d $(MODULELIB_PATH) ] ; then \
|
||||
echo "Missing $(SA_CLASSPATH) file. Use 1.6.0 or later version of JDK";\
|
||||
echo ""; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \
|
||||
mkdir -p $(SA_CLASSDIR); \
|
||||
fi
|
||||
# Note: When indented, make tries to execute the '$(shell' comment.
|
||||
# In some environments, cmd processors have limited line length.
|
||||
# To prevent the javac invocation in the next block from using
|
||||
# a very long cmd line, we use javac's @file-list option. We
|
||||
# generate the file lists using make's built-in 'foreach' control
|
||||
# flow which also avoids cmd processor line length issues. Since
|
||||
# the 'foreach' is done as part of make's macro expansion phase,
|
||||
# the initialization of the lists is also done in the same phase
|
||||
# using '$(shell rm ...' instead of using the more traditional
|
||||
# 'rm ...' rule.
|
||||
$(shell rm -rf $(AGENT_FILES_LIST))
|
||||
# gnumake 3.78.1 does not accept the *'s that
|
||||
# are in AGENT_FILES, so use the shell to expand them.
|
||||
# Be extra carefull to not produce too long command lines in the shell!
|
||||
$(foreach file,$(AGENT_FILES),$(shell ls -1 $(file) >> $(AGENT_FILES_LIST)))
|
||||
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES_LIST)
|
||||
$(QUIETLY) $(REMOTE) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
|
||||
$(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
|
||||
$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
|
||||
$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
|
||||
$(QUIETLY) mkdir -p $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
|
||||
$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/*
|
||||
$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
|
||||
$(QUIETLY) cp -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
|
||||
$(QUIETLY) $(REMOTE) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
|
||||
$(QUIETLY) $(REMOTE) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
|
||||
$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext
|
||||
$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.ia64.IA64ThreadContext
|
||||
$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
|
||||
$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.sparc.SPARCThreadContext
|
||||
|
||||
clean:
|
||||
rm -rf $(SA_CLASSDIR)
|
||||
rm -rf $(GENERATED)/sa-jdi.jar
|
||||
rm -rf $(AGENT_FILES_LIST)
|
117
hotspot/make/aix/makefiles/saproc.make
Normal file
117
hotspot/make/aix/makefiles/saproc.make
Normal file
@ -0,0 +1,117 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please 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 $(GAMMADIR)/make/defs.make
|
||||
|
||||
# Rules to build serviceability agent library, used by vm.make
|
||||
|
||||
# libsaproc.so: serviceability agent
|
||||
|
||||
SAPROC = saproc
|
||||
LIBSAPROC = lib$(SAPROC).so
|
||||
|
||||
LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo
|
||||
LIBSAPROC_DIZ = lib$(SAPROC).diz
|
||||
|
||||
AGENT_DIR = $(GAMMADIR)/agent
|
||||
|
||||
SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)
|
||||
|
||||
SASRCFILES = $(SASRCDIR)/salibelf.c \
|
||||
$(SASRCDIR)/symtab.c \
|
||||
$(SASRCDIR)/libproc_impl.c \
|
||||
$(SASRCDIR)/ps_proc.c \
|
||||
$(SASRCDIR)/ps_core.c \
|
||||
$(SASRCDIR)/LinuxDebuggerLocal.c \
|
||||
|
||||
SAMAPFILE = $(SASRCDIR)/mapfile
|
||||
|
||||
DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
|
||||
DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO)
|
||||
DEST_SAPROC_DIZ = $(JDK_LIBDIR)/$(LIBSAPROC_DIZ)
|
||||
|
||||
# DEBUG_BINARIES overrides everything, use full -g debug information
|
||||
ifeq ($(DEBUG_BINARIES), true)
|
||||
SA_DEBUG_CFLAGS = -g
|
||||
endif
|
||||
|
||||
# if $(AGENT_DIR) does not exist, we don't build SA
|
||||
# also, we don't build SA on Itanium, PPC, ARM or zero.
|
||||
|
||||
ifneq ($(wildcard $(AGENT_DIR)),)
|
||||
ifneq ($(filter-out ia64 arm ppc zero,$(SRCARCH)),)
|
||||
BUILDLIBSAPROC = $(LIBSAPROC)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
|
||||
|
||||
$(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
|
||||
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
|
||||
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@echo Making SA debugger back-end...
|
||||
$(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \
|
||||
-D_FILE_OFFSET_BITS=64 \
|
||||
$(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
|
||||
$(BIN_UTILS) \
|
||||
-I$(SASRCDIR) \
|
||||
-I$(GENERATED) \
|
||||
-I$(BOOT_JAVA_HOME)/include \
|
||||
-I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \
|
||||
$(SASRCFILES) \
|
||||
$(SA_LFLAGS) \
|
||||
$(SA_DEBUG_CFLAGS) \
|
||||
-o $@ \
|
||||
-lthread_db
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
|
||||
$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
|
||||
ifeq ($(STRIP_POLICY),all_strip)
|
||||
$(QUIETLY) $(STRIP) $@
|
||||
else
|
||||
ifeq ($(STRIP_POLICY),min_strip)
|
||||
$(QUIETLY) $(STRIP) -g $@
|
||||
# implied else here is no stripping at all
|
||||
endif
|
||||
endif
|
||||
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||
$(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO)
|
||||
$(RM) $(LIBSAPROC_DEBUGINFO)
|
||||
endif
|
||||
endif
|
||||
|
||||
install_saproc: $(BUILDLIBSAPROC)
|
||||
$(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \
|
||||
echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
|
||||
test -f $(LIBSAPROC_DEBUGINFO) && \
|
||||
cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
|
||||
test -f $(LIBSAPROC_DIZ) && \
|
||||
cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
|
||||
cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
|
||||
fi
|
||||
|
||||
.PHONY: install_saproc
|
144
hotspot/make/aix/makefiles/top.make
Normal file
144
hotspot/make/aix/makefiles/top.make
Normal file
@ -0,0 +1,144 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# top.make is included in the Makefile in the build directories.
|
||||
# It DOES NOT include the vm dependency info in order to be faster.
|
||||
# Its main job is to implement the incremental form of make lists.
|
||||
# It also:
|
||||
# -builds and runs adlc via adlc.make
|
||||
# -generates JVMTI source and docs via jvmti.make (JSR-163)
|
||||
# -generate sa-jdi.jar (JDI binding to core files)
|
||||
|
||||
# It assumes the following flags are set:
|
||||
# CFLAGS Platform_file, Src_Dirs_I, Src_Dirs_V, SYSDEFS, AOUT, Obj_Files
|
||||
|
||||
# -- D. Ungar (5/97) from a file by Bill Bush
|
||||
|
||||
# Don't override the built-in $(MAKE).
|
||||
# Instead, use "gmake" (or "gnumake") from the command line. --Rose
|
||||
#MAKE = gmake
|
||||
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
TOPDIR = $(shell echo `pwd`)
|
||||
GENERATED = $(TOPDIR)/../generated
|
||||
VM = $(GAMMADIR)/src/share/vm
|
||||
Plat_File = $(Platform_file)
|
||||
CDG = cd $(GENERATED);
|
||||
|
||||
ifneq ($(USE_PRECOMPILED_HEADER),0)
|
||||
UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS)
|
||||
else
|
||||
UpdatePCH = \# precompiled header is not used
|
||||
endif
|
||||
|
||||
Cached_plat = $(GENERATED)/platform.current
|
||||
|
||||
AD_Dir = $(GENERATED)/adfiles
|
||||
ADLC = $(AD_Dir)/adlc
|
||||
AD_Spec = $(call altsrc-replace,$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad)
|
||||
AD_Src = $(call altsrc-replace,$(HS_COMMON_SRC)/share/vm/adlc)
|
||||
AD_Names = ad_$(Platform_arch_model).hpp ad_$(Platform_arch_model).cpp
|
||||
AD_Files = $(AD_Names:%=$(AD_Dir)/%)
|
||||
|
||||
# AD_Files_If_Required/COMPILER1 = ad_stuff
|
||||
AD_Files_If_Required/COMPILER2 = ad_stuff
|
||||
AD_Files_If_Required/TIERED = ad_stuff
|
||||
AD_Files_If_Required = $(AD_Files_If_Required/$(TYPE))
|
||||
|
||||
# Wierd argument adjustment for "gnumake -j..."
|
||||
adjust-mflags = $(GENERATED)/adjust-mflags
|
||||
MFLAGS-adjusted = -r `$(adjust-mflags) "$(MFLAGS)" "$(HOTSPOT_BUILD_JOBS)"`
|
||||
|
||||
|
||||
# default target: update lists, make vm
|
||||
# done in stages to force sequential order with parallel make
|
||||
#
|
||||
|
||||
default: vm_build_preliminaries the_vm
|
||||
@echo All done.
|
||||
|
||||
# This is an explicit dependency for the sake of parallel makes.
|
||||
vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) trace_stuff jvmti_stuff sa_stuff
|
||||
@# We need a null action here, so implicit rules don't get consulted.
|
||||
|
||||
$(Cached_plat): $(Plat_File)
|
||||
$(CDG) cp $(Plat_File) $(Cached_plat)
|
||||
|
||||
# make AD files as necessary
|
||||
ad_stuff: $(Cached_plat) $(adjust-mflags)
|
||||
@$(MAKE) -f adlc.make $(MFLAGS-adjusted)
|
||||
|
||||
# generate JVMTI files from the spec
|
||||
jvmti_stuff: $(Cached_plat) $(adjust-mflags)
|
||||
@$(MAKE) -f jvmti.make $(MFLAGS-adjusted)
|
||||
|
||||
# generate trace files
|
||||
trace_stuff: jvmti_stuff $(Cached_plat) $(adjust-mflags)
|
||||
@$(MAKE) -f trace.make $(MFLAGS-adjusted)
|
||||
|
||||
# generate SA jar files and native header
|
||||
sa_stuff:
|
||||
@$(MAKE) -f sa.make $(MFLAGS-adjusted)
|
||||
|
||||
# and the VM: must use other makefile with dependencies included
|
||||
|
||||
# We have to go to great lengths to get control over the -jN argument
|
||||
# to the recursive invocation of vm.make. The problem is that gnumake
|
||||
# resets -jN to -j1 for recursive runs. (How helpful.)
|
||||
# Note that the user must specify the desired parallelism level via a
|
||||
# command-line or environment variable name HOTSPOT_BUILD_JOBS.
|
||||
$(adjust-mflags): $(GAMMADIR)/make/$(Platform_os_family)/makefiles/adjust-mflags.sh
|
||||
@+rm -f $@ $@+
|
||||
@+cat $< > $@+
|
||||
@+chmod +x $@+
|
||||
@+mv $@+ $@
|
||||
|
||||
the_vm: vm_build_preliminaries $(adjust-mflags)
|
||||
@$(UpdatePCH)
|
||||
@$(MAKE) -f vm.make $(MFLAGS-adjusted)
|
||||
|
||||
install gamma: the_vm
|
||||
@$(MAKE) -f vm.make $@
|
||||
|
||||
# next rules support "make foo.[ois]"
|
||||
|
||||
%.o %.i %.s:
|
||||
$(UpdatePCH)
|
||||
$(MAKE) -f vm.make $(MFLAGS) $@
|
||||
#$(MAKE) -f vm.make $@
|
||||
|
||||
# this should force everything to be rebuilt
|
||||
clean:
|
||||
rm -f $(GENERATED)/*.class
|
||||
$(MAKE) -f vm.make $(MFLAGS) clean
|
||||
|
||||
# just in case it doesn't, this should do it
|
||||
realclean:
|
||||
$(MAKE) -f vm.make $(MFLAGS) clean
|
||||
rm -fr $(GENERATED)
|
||||
|
||||
.PHONY: default vm_build_preliminaries
|
||||
.PHONY: lists ad_stuff jvmti_stuff sa_stuff the_vm clean realclean
|
||||
.PHONY: checks check_os_version install
|
120
hotspot/make/aix/makefiles/trace.make
Normal file
120
hotspot/make/aix/makefiles/trace.make
Normal file
@ -0,0 +1,120 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# This makefile (trace.make) is included from the trace.make in the
|
||||
# build directories.
|
||||
#
|
||||
# It knows how to build and run the tools to generate trace files.
|
||||
|
||||
include $(GAMMADIR)/make/linux/makefiles/rules.make
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
# #########################################################################
|
||||
|
||||
HAS_ALT_SRC:=$(shell if [ -d $(HS_ALT_SRC)/share/vm/trace ]; then \
|
||||
echo "true"; else echo "false";\
|
||||
fi)
|
||||
|
||||
TOPDIR = $(shell echo `pwd`)
|
||||
GENERATED = $(TOPDIR)/../generated
|
||||
JvmtiOutDir = $(GENERATED)/jvmtifiles
|
||||
TraceOutDir = $(GENERATED)/tracefiles
|
||||
|
||||
TraceAltSrcDir = $(HS_ALT_SRC)/share/vm/trace
|
||||
TraceSrcDir = $(HS_COMMON_SRC)/share/vm/trace
|
||||
|
||||
# set VPATH so make knows where to look for source files
|
||||
Src_Dirs_V += $(TraceSrcDir) $(TraceAltSrcDir)
|
||||
VPATH += $(Src_Dirs_V:%=%:)
|
||||
|
||||
TraceGeneratedNames = \
|
||||
traceEventClasses.hpp \
|
||||
traceEventIds.hpp \
|
||||
traceTypes.hpp
|
||||
|
||||
ifeq ($(HAS_ALT_SRC), true)
|
||||
TraceGeneratedNames += \
|
||||
traceRequestables.hpp \
|
||||
traceEventControl.hpp
|
||||
|
||||
ifneq ($(INCLUDE_TRACE), false)
|
||||
TraceGeneratedNames += traceProducer.cpp
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
|
||||
|
||||
XSLT = $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen
|
||||
|
||||
XML_DEPS = $(TraceSrcDir)/trace.xml $(TraceSrcDir)/tracetypes.xml \
|
||||
$(TraceSrcDir)/trace.dtd $(TraceSrcDir)/xinclude.mod
|
||||
ifeq ($(HAS_ALT_SRC), true)
|
||||
XML_DEPS += $(TraceAltSrcDir)/traceevents.xml
|
||||
endif
|
||||
|
||||
.PHONY: all clean cleanall
|
||||
|
||||
# #########################################################################
|
||||
|
||||
all: $(TraceGeneratedFiles)
|
||||
|
||||
GENERATE_CODE= \
|
||||
$(QUIETLY) echo Generating $@; \
|
||||
$(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \
|
||||
test -f $@
|
||||
|
||||
$(TraceOutDir)/traceEventIds.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventIds.xsl $(XML_DEPS)
|
||||
$(GENERATE_CODE)
|
||||
|
||||
$(TraceOutDir)/traceTypes.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceTypes.xsl $(XML_DEPS)
|
||||
$(GENERATE_CODE)
|
||||
|
||||
ifeq ($(HAS_ALT_SRC), false)
|
||||
|
||||
$(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventClasses.xsl $(XML_DEPS)
|
||||
$(GENERATE_CODE)
|
||||
|
||||
else
|
||||
|
||||
$(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS)
|
||||
$(GENERATE_CODE)
|
||||
|
||||
$(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS)
|
||||
$(GENERATE_CODE)
|
||||
|
||||
$(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS)
|
||||
$(GENERATE_CODE)
|
||||
|
||||
$(TraceOutDir)/traceEventControl.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventControl.xsl $(XML_DEPS)
|
||||
$(GENERATE_CODE)
|
||||
|
||||
endif
|
||||
|
||||
# #########################################################################
|
||||
|
||||
clean cleanall:
|
||||
rm $(TraceGeneratedFiles)
|
||||
|
||||
|
377
hotspot/make/aix/makefiles/vm.make
Normal file
377
hotspot/make/aix/makefiles/vm.make
Normal file
@ -0,0 +1,377 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Rules to build JVM and related libraries, included from vm.make in the build
|
||||
# directory.
|
||||
|
||||
# Common build rules.
|
||||
MAKEFILES_DIR=$(GAMMADIR)/make/$(Platform_os_family)/makefiles
|
||||
include $(MAKEFILES_DIR)/rules.make
|
||||
include $(GAMMADIR)/make/altsrc.make
|
||||
|
||||
default: build
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Defs
|
||||
|
||||
GENERATED = ../generated
|
||||
DEP_DIR = $(GENERATED)/dependencies
|
||||
|
||||
# reads the generated files defining the set of .o's and the .o .h dependencies
|
||||
-include $(DEP_DIR)/*.d
|
||||
|
||||
# read machine-specific adjustments (%%% should do this via buildtree.make?)
|
||||
ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
|
||||
include $(MAKEFILES_DIR)/zeroshark.make
|
||||
else
|
||||
include $(MAKEFILES_DIR)/$(BUILDARCH).make
|
||||
endif
|
||||
|
||||
# set VPATH so make knows where to look for source files
|
||||
# Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
|
||||
# The adfiles directory contains ad_<arch>.[ch]pp.
|
||||
# The jvmtifiles directory contains jvmti*.[ch]pp
|
||||
Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles $(GENERATED)/tracefiles
|
||||
VPATH += $(Src_Dirs_V:%=%:)
|
||||
|
||||
# set INCLUDES for C preprocessor.
|
||||
Src_Dirs_I += $(GENERATED)
|
||||
# The order is important for the precompiled headers to work.
|
||||
INCLUDES += $(PRECOMPILED_HEADER_DIR:%=-I%) $(Src_Dirs_I:%=-I%)
|
||||
|
||||
# SYMFLAG is used by {jsig,saproc}.make
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
# always build with debug info when we can create .debuginfo files
|
||||
SYMFLAG = -g
|
||||
else
|
||||
ifeq (${VERSION}, debug)
|
||||
SYMFLAG = -g
|
||||
else
|
||||
SYMFLAG =
|
||||
endif
|
||||
endif
|
||||
|
||||
# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
|
||||
# in $(GAMMADIR)/make/defs.make
|
||||
ifeq ($(HOTSPOT_BUILD_VERSION),)
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)\""
|
||||
else
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)\""
|
||||
endif
|
||||
|
||||
# The following variables are defined in the generated flags.make file.
|
||||
BUILD_VERSION = -DHOTSPOT_RELEASE_VERSION="\"$(HS_BUILD_VER)\""
|
||||
JRE_VERSION = -DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""
|
||||
HS_LIB_ARCH = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
|
||||
BUILD_TARGET = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
|
||||
BUILD_USER = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
|
||||
VM_DISTRO = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
|
||||
|
||||
CXXFLAGS = \
|
||||
${SYSDEFS} \
|
||||
${INCLUDES} \
|
||||
${BUILD_VERSION} \
|
||||
${BUILD_TARGET} \
|
||||
${BUILD_USER} \
|
||||
${HS_LIB_ARCH} \
|
||||
${VM_DISTRO}
|
||||
|
||||
# This is VERY important! The version define must only be supplied to vm_version.o
|
||||
# If not, ccache will not re-use the cache at all, since the version string might contain
|
||||
# a time and date.
|
||||
vm_version.o: CXXFLAGS += ${JRE_VERSION}
|
||||
|
||||
CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
|
||||
|
||||
# File specific flags
|
||||
CXXFLAGS += $(CXXFLAGS/BYFILE)
|
||||
|
||||
|
||||
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
|
||||
CFLAGS += $(CFLAGS_WARN/BYFILE)
|
||||
|
||||
# Do not use C++ exception handling
|
||||
CFLAGS += $(CFLAGS/NOEX)
|
||||
|
||||
# Extra flags from gnumake's invocation or environment
|
||||
CFLAGS += $(EXTRA_CFLAGS)
|
||||
LFLAGS += $(EXTRA_CFLAGS)
|
||||
|
||||
# Don't set excutable bit on stack segment
|
||||
# the same could be done by separate execstack command
|
||||
#LFLAGS += -Xlinker -z -Xlinker noexecstack
|
||||
|
||||
LIBS += -lm -ldl -lpthread
|
||||
|
||||
# By default, link the *.o into the library, not the executable.
|
||||
LINK_INTO$(LINK_INTO) = LIBJVM
|
||||
|
||||
JDK_LIBDIR = $(JAVA_HOME)/jre/lib/$(LIBARCH)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# jvm_db & dtrace
|
||||
include $(MAKEFILES_DIR)/dtrace.make
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# JVM
|
||||
|
||||
JVM = jvm
|
||||
LIBJVM = lib$(JVM).so
|
||||
|
||||
CFLAGS += -DALLOW_OPERATOR_NEW_USAGE
|
||||
|
||||
LIBJVM_DEBUGINFO = lib$(JVM).debuginfo
|
||||
LIBJVM_DIZ = lib$(JVM).diz
|
||||
|
||||
SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt
|
||||
|
||||
SOURCE_PATHS=\
|
||||
$(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
|
||||
\( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) \))
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(SRCARCH)/vm
|
||||
SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_family)_$(SRCARCH)/vm
|
||||
|
||||
CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
|
||||
CORE_PATHS+=$(GENERATED)/jvmtifiles $(GENERATED)/tracefiles
|
||||
|
||||
ifneq ($(INCLUDE_TRACE), false)
|
||||
CORE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \
|
||||
find $(HS_ALT_SRC)/share/vm/jfr -type d; \
|
||||
fi)
|
||||
endif
|
||||
|
||||
COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
|
||||
COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1
|
||||
|
||||
COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto)
|
||||
COMPILER2_PATHS += $(call altsrc,$(HS_COMMON_SRC)/share/vm/libadt)
|
||||
COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/opto
|
||||
COMPILER2_PATHS += $(HS_COMMON_SRC)/share/vm/libadt
|
||||
COMPILER2_PATHS += $(GENERATED)/adfiles
|
||||
|
||||
SHARK_PATHS := $(GAMMADIR)/src/share/vm/shark
|
||||
|
||||
# Include dirs per type.
|
||||
Src_Dirs/CORE := $(CORE_PATHS)
|
||||
Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS)
|
||||
Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS)
|
||||
Src_Dirs/TIERED := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS)
|
||||
Src_Dirs/ZERO := $(CORE_PATHS)
|
||||
Src_Dirs/SHARK := $(CORE_PATHS) $(SHARK_PATHS)
|
||||
Src_Dirs := $(Src_Dirs/$(TYPE))
|
||||
|
||||
COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp c2_\* runtime_\*
|
||||
COMPILER1_SPECIFIC_FILES := c1_\*
|
||||
SHARK_SPECIFIC_FILES := shark
|
||||
ZERO_SPECIFIC_FILES := zero
|
||||
|
||||
# Always exclude these.
|
||||
Src_Files_EXCLUDE += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp
|
||||
|
||||
# Exclude per type.
|
||||
Src_Files_EXCLUDE/CORE := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
|
||||
Src_Files_EXCLUDE/COMPILER1 := $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
|
||||
Src_Files_EXCLUDE/COMPILER2 := $(COMPILER1_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES)
|
||||
Src_Files_EXCLUDE/TIERED := $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES)
|
||||
Src_Files_EXCLUDE/ZERO := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
|
||||
Src_Files_EXCLUDE/SHARK := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES)
|
||||
|
||||
Src_Files_EXCLUDE += $(Src_Files_EXCLUDE/$(TYPE))
|
||||
|
||||
# Disable ELF decoder on AIX (AIX uses XCOFF).
|
||||
Src_Files_EXCLUDE += decoder_elf.cpp elfFile.cpp elfStringTable.cpp elfSymbolTable.cpp elfFuncDescTable.cpp
|
||||
|
||||
# Special handling of arch model.
|
||||
ifeq ($(Platform_arch_model), x86_32)
|
||||
Src_Files_EXCLUDE += \*x86_64\*
|
||||
endif
|
||||
ifeq ($(Platform_arch_model), x86_64)
|
||||
Src_Files_EXCLUDE += \*x86_32\*
|
||||
endif
|
||||
|
||||
# Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE.
|
||||
define findsrc
|
||||
$(notdir $(shell find $(1)/. ! -name . -prune \
|
||||
-a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \
|
||||
-a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \)))
|
||||
endef
|
||||
|
||||
Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e)))
|
||||
|
||||
Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files))))
|
||||
|
||||
JVM_OBJ_FILES = $(Obj_Files)
|
||||
|
||||
vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
|
||||
|
||||
mapfile : $(MAPFILE) vm.def
|
||||
rm -f $@
|
||||
awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE") \
|
||||
{ system ("cat vm.def"); } \
|
||||
else \
|
||||
{ print $$0 } \
|
||||
}' > $@ < $(MAPFILE)
|
||||
|
||||
mapfile_reorder : mapfile $(REORDERFILE)
|
||||
rm -f $@
|
||||
cat $^ > $@
|
||||
|
||||
vm.def: $(Res_Files) $(Obj_Files)
|
||||
sh $(GAMMADIR)/make/aix/makefiles/build_vm_def.sh *.o > $@
|
||||
|
||||
ifeq ($(JVM_VARIANT_ZEROSHARK), true)
|
||||
STATIC_CXX = false
|
||||
else
|
||||
ifeq ($(ZERO_LIBARCH), ppc64)
|
||||
STATIC_CXX = false
|
||||
else
|
||||
STATIC_CXX = true
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(LINK_INTO),AOUT)
|
||||
LIBJVM.o =
|
||||
LIBJVM_MAPFILE =
|
||||
LIBS_VM = $(LIBS)
|
||||
else
|
||||
LIBJVM.o = $(JVM_OBJ_FILES)
|
||||
LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
|
||||
LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
|
||||
# xlC_r ignores the -o= syntax
|
||||
# LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
|
||||
|
||||
# JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
|
||||
# get around library dependency and compatibility issues. Must use gcc not
|
||||
# g++ to link.
|
||||
LIBS_VM += $(STATIC_STDCXX) $(LIBS)
|
||||
endif
|
||||
|
||||
LINK_VM = $(LINK_LIB.CXX)
|
||||
|
||||
# create loadmap for libjvm.so by default. Helps in diagnosing some problems.
|
||||
LFLAGS_VM += -bloadmap:libjvm.loadmap
|
||||
|
||||
# rule for building precompiled header
|
||||
$(PRECOMPILED_HEADER):
|
||||
$(QUIETLY) echo Generating precompiled header $@
|
||||
$(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)
|
||||
$(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE)
|
||||
|
||||
# making the library:
|
||||
|
||||
ifneq ($(JVM_BASE_ADDR),)
|
||||
# By default shared library is linked at base address == 0. Modify the
|
||||
# linker script if JVM prefers a different base location. It can also be
|
||||
# implemented with 'prelink -r'. But 'prelink' is not (yet) available on
|
||||
# our build platform (AS-2.1).
|
||||
LD_SCRIPT = libjvm.so.lds
|
||||
$(LD_SCRIPT): $(LIBJVM_MAPFILE)
|
||||
$(QUIETLY) { \
|
||||
rm -rf $@; \
|
||||
$(LINK_VM) -Wl,--verbose $(LFLAGS_VM) 2>&1 | \
|
||||
sed -e '/^======/,/^======/!d' \
|
||||
-e '/^======/d' \
|
||||
-e 's/0\( + SIZEOF_HEADERS\)/$(JVM_BASE_ADDR)\1/' \
|
||||
> $@; \
|
||||
}
|
||||
LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT)
|
||||
endif
|
||||
|
||||
# With more recent Redhat releases (or the cutting edge version Fedora), if
|
||||
# SELinux is configured to be enabled, the runtime linker will fail to apply
|
||||
# the text relocation to libjvm.so considering that it is built as a non-PIC
|
||||
# DSO. To workaround that, we run chcon to libjvm.so after it is built. See
|
||||
# details in bug 6538311.
|
||||
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
|
||||
$(QUIETLY) { \
|
||||
echo Linking vm...; \
|
||||
$(LINK_LIB.CXX/PRE_HOOK) \
|
||||
$(LINK_VM) $(LD_SCRIPT_FLAG) \
|
||||
$(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \
|
||||
$(LINK_LIB.CXX/POST_HOOK) \
|
||||
rm -f $@.1; ln -s $@ $@.1; \
|
||||
}
|
||||
# No security contexts on AIX
|
||||
# if [ \"$(CROSS_COMPILE_ARCH)\" = \"\" ] ; then \
|
||||
# if [ -x /usr/sbin/selinuxenabled ] ; then \
|
||||
# /usr/sbin/selinuxenabled; \
|
||||
# if [ $$? = 0 ] ; then \
|
||||
# /usr/bin/chcon -t textrel_shlib_t $@; \
|
||||
# if [ $$? != 0 ]; then \
|
||||
# echo "ERROR: Cannot chcon $@"; \
|
||||
# fi \
|
||||
# fi \
|
||||
# fi \
|
||||
# fi \
|
||||
# }
|
||||
|
||||
#ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
# $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
|
||||
# $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
|
||||
# ifeq ($(STRIP_POLICY),all_strip)
|
||||
# $(QUIETLY) $(STRIP) $@
|
||||
# else
|
||||
# ifeq ($(STRIP_POLICY),min_strip)
|
||||
# $(QUIETLY) $(STRIP) -g $@
|
||||
# # implied else here is no stripping at all
|
||||
# endif
|
||||
# endif
|
||||
# ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||
# $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)
|
||||
# $(RM) $(LIBJVM_DEBUGINFO)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR)
|
||||
DEST_JVM = $(DEST_SUBDIR)/$(LIBJVM)
|
||||
DEST_JVM_DEBUGINFO = $(DEST_SUBDIR)/$(LIBJVM_DEBUGINFO)
|
||||
DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
|
||||
|
||||
install_jvm: $(LIBJVM)
|
||||
@echo "Copying $(LIBJVM) to $(DEST_JVM)"
|
||||
$(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
|
||||
cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
|
||||
$(QUIETLY) test -f $(LIBJVM_DIZ) && \
|
||||
cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Other files
|
||||
|
||||
# Signal interposition library
|
||||
include $(MAKEFILES_DIR)/jsig.make
|
||||
|
||||
# Serviceability agent
|
||||
include $(MAKEFILES_DIR)/saproc.make
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC)
|
||||
|
||||
install: install_jvm install_jsig install_saproc
|
||||
|
||||
.PHONY: default build install install_jvm
|
159
hotspot/make/aix/makefiles/xlc.make
Normal file
159
hotspot/make/aix/makefiles/xlc.make
Normal file
@ -0,0 +1,159 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2013 SAP. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# CC, CXX & AS
|
||||
|
||||
# Set compiler explicitly
|
||||
CXX = $(COMPILER_PATH)xlC_r
|
||||
CC = $(COMPILER_PATH)xlc_r
|
||||
HOSTCXX = $(CXX)
|
||||
HOSTCC = $(CC)
|
||||
|
||||
AS = $(CC) -c
|
||||
|
||||
# get xlc version
|
||||
CXX_VERSION := $(shell $(CXX) -qversion 2>&1 | sed -n 's/.*Version: \([0-9.]*\)/\1/p')
|
||||
|
||||
# xlc 08.00.0000.0023 and higher supports -qtune=balanced
|
||||
CXX_SUPPORTS_BALANCED_TUNING=$(shell if [ $(subst .,,$(CXX_VERSION)) -ge 080000000023 ] ; then echo "true" ; fi)
|
||||
# xlc 10.01 is used with aggressive optimizations to boost performance
|
||||
CXX_IS_V10=$(shell if [ $(subst .,,$(CXX_VERSION)) -ge 100100000000 ] ; then echo "true" ; fi)
|
||||
|
||||
# check for precompiled headers support
|
||||
|
||||
# Switch off the precompiled header support. Neither xlC 8.0 nor xlC 10.0
|
||||
# support precompiled headers. Both "understand" the command line switches "-qusepcomp" and
|
||||
# "-qgenpcomp" but when we specify them the following message is printed:
|
||||
# "1506-755 (W) The -qusepcomp option is not supported in this release."
|
||||
USE_PRECOMPILED_HEADER = 0
|
||||
ifneq ($(USE_PRECOMPILED_HEADER),0)
|
||||
PRECOMPILED_HEADER_DIR=.
|
||||
PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp
|
||||
PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
|
||||
endif
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Compiler flags
|
||||
|
||||
# position-independent code
|
||||
PICFLAG = -qpic=large
|
||||
|
||||
VM_PICFLAG/LIBJVM = $(PICFLAG)
|
||||
VM_PICFLAG/AOUT =
|
||||
VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
|
||||
|
||||
CFLAGS += $(VM_PICFLAG)
|
||||
CFLAGS += -qnortti
|
||||
CFLAGS += -qnoeh
|
||||
|
||||
CFLAGS += -D_REENTRANT
|
||||
# no xlc counterpart for -fcheck-new
|
||||
# CFLAGS += -fcheck-new
|
||||
|
||||
ARCHFLAG = -q64
|
||||
|
||||
CFLAGS += $(ARCHFLAG)
|
||||
AOUT_FLAGS += $(ARCHFLAG)
|
||||
LFLAGS += $(ARCHFLAG)
|
||||
ASFLAGS += $(ARCHFLAG)
|
||||
|
||||
# Use C++ Interpreter
|
||||
ifdef CC_INTERP
|
||||
CFLAGS += -DCC_INTERP
|
||||
endif
|
||||
|
||||
# Keep temporary files (.ii, .s)
|
||||
# no counterpart on xlc for -save-temps, -pipe
|
||||
|
||||
# Compiler warnings are treated as errors
|
||||
# Do not treat warnings as errors
|
||||
# WARNINGS_ARE_ERRORS = -Werror
|
||||
# Except for a few acceptable ones
|
||||
# ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare
|
||||
# CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
|
||||
CFLAGS_WARN/COMMON =
|
||||
CFLAGS_WARN/DEFAULT = $(CFLAGS_WARN/COMMON) $(EXTRA_WARNINGS)
|
||||
# Special cases
|
||||
CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
|
||||
|
||||
# The flags to use for an optimized build
|
||||
OPT_CFLAGS += -O3
|
||||
|
||||
# Hotspot uses very unstrict aliasing turn this optimization off
|
||||
OPT_CFLAGS += -qalias=noansi
|
||||
|
||||
OPT_CFLAGS/NOOPT=-qnoopt
|
||||
|
||||
DEPFLAGS = -qmakedep=gcc -MF $(DEP_DIR)/$(@:%=%.d)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Linker flags
|
||||
|
||||
# statically link libstdc++.so, work with gcc but ignored by g++
|
||||
STATIC_STDCXX = -Wl,-lC_r
|
||||
|
||||
# Enable linker optimization
|
||||
# no counterpart on xlc for this
|
||||
# LFLAGS += -Xlinker -O1
|
||||
|
||||
# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
|
||||
# MAPFLAG = -Xlinker --version-script=FILENAME
|
||||
|
||||
# Build shared library
|
||||
SHARED_FLAG = -q64 -b64 -bexpall -G -bnoentry -qmkshrobj -brtl -bnolibpath
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Debug flags
|
||||
|
||||
# Always compile with '-g' to get symbols in the stacktraces in the hs_err file
|
||||
DEBUG_CFLAGS += -g
|
||||
FASTDEBUG_CFLAGS += -g
|
||||
OPT_CFLAGS += -g
|
||||
|
||||
# DEBUG_BINARIES overrides everything, use full -g debug information
|
||||
ifeq ($(DEBUG_BINARIES), true)
|
||||
DEBUG_CFLAGS = -g
|
||||
CFLAGS += $(DEBUG_CFLAGS)
|
||||
endif
|
||||
|
||||
# If we are building HEADLESS, pass on to VM
|
||||
# so it can set the java.awt.headless property
|
||||
ifdef HEADLESS
|
||||
CFLAGS += -DHEADLESS
|
||||
endif
|
||||
|
||||
# We are building Embedded for a small device
|
||||
# favor code space over speed
|
||||
ifdef MINIMIZE_RAM_USAGE
|
||||
CFLAGS += -DMINIMIZE_RAM_USAGE
|
||||
endif
|
||||
|
||||
ifdef CROSS_COMPILE_ARCH
|
||||
STRIP = $(ALT_COMPILER_PATH)/strip
|
||||
else
|
||||
STRIP = strip
|
||||
endif
|
17
hotspot/make/aix/platform_ppc64
Normal file
17
hotspot/make/aix/platform_ppc64
Normal file
@ -0,0 +1,17 @@
|
||||
os_family = aix
|
||||
|
||||
arch = ppc
|
||||
|
||||
arch_model = ppc_64
|
||||
|
||||
os_arch = aix_ppc
|
||||
|
||||
os_arch_model = aix_ppc_64
|
||||
|
||||
lib_arch = ppc64
|
||||
|
||||
compiler = xlc
|
||||
|
||||
gnu_dis_arch = ppc64
|
||||
|
||||
sysdefs = -DAIX -DPPC64
|
@ -53,6 +53,7 @@ JVMOFFS.o = $(JVMOFFS).o
|
||||
GENOFFS = generate$(JVMOFFS)
|
||||
|
||||
DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace
|
||||
DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace
|
||||
DTRACE = dtrace
|
||||
DTRACE.o = $(DTRACE).o
|
||||
|
||||
@ -262,14 +263,14 @@ endif
|
||||
$(DtraceOutDir):
|
||||
mkdir $(DtraceOutDir)
|
||||
|
||||
$(DtraceOutDir)/hotspot.h: $(DTRACE_SRCDIR)/hotspot.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot.d
|
||||
$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d
|
||||
|
||||
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot_jni.d
|
||||
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d
|
||||
|
||||
$(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d
|
||||
$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d
|
||||
|
||||
dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
|
||||
|
||||
|
@ -260,7 +260,7 @@ ifeq ($(USE_CLANG), true)
|
||||
WARNINGS_ARE_ERRORS += -Wno-empty-body
|
||||
endif
|
||||
|
||||
WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
|
||||
WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wformat=2 -Wno-error=format-nonliteral
|
||||
|
||||
ifeq ($(USE_CLANG),)
|
||||
# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
|
||||
@ -289,7 +289,7 @@ CFLAGS += -fno-strict-aliasing
|
||||
# The flags to use for an Optimized g++ build
|
||||
ifeq ($(OS_VENDOR), Darwin)
|
||||
# use -Os by default, unless -O3 can be proved to be worth the cost, as per policy
|
||||
# <http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port+Compilers>
|
||||
# <https://wiki.openjdk.java.net/display/MacOSXPort/Compiler+Errata>
|
||||
OPT_CFLAGS_DEFAULT ?= SIZE
|
||||
else
|
||||
OPT_CFLAGS_DEFAULT ?= SPEED
|
||||
@ -364,6 +364,11 @@ ASFLAGS += -x assembler-with-cpp
|
||||
# statically link libstdc++.so, work with gcc but ignored by g++
|
||||
STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
|
||||
|
||||
# Ensure use libstdc++ on clang, not libc++
|
||||
ifeq ($(USE_CLANG), true)
|
||||
LFLAGS += -stdlib=libstdc++
|
||||
endif
|
||||
|
||||
ifeq ($(USE_CLANG),)
|
||||
# statically link libgcc and/or libgcc_s, libgcc does not exist before gcc-3.x.
|
||||
ifneq ("${CC_VER_MAJOR}", "2")
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -91,13 +91,13 @@ endif
|
||||
install_jsig: $(LIBJSIG)
|
||||
@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
|
||||
ifeq ($(OS_VENDOR), Darwin)
|
||||
$(QUIETLY) test -d $(LIBJSIG_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -d $(LIBJSIG_DEBUGINFO) || \
|
||||
cp -f -r $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
|
||||
else
|
||||
$(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \
|
||||
cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
|
||||
endif
|
||||
$(QUIETLY) test -f $(LIBJSIG_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \
|
||||
cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -153,13 +153,13 @@ endif
|
||||
install_saproc: $(BUILDLIBSAPROC)
|
||||
@echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"
|
||||
ifeq ($(OS_VENDOR), Darwin)
|
||||
$(QUIETLY) test -d $(LIBSAPROC_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -d $(LIBSAPROC_DEBUGINFO) || \
|
||||
cp -f -r $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO)
|
||||
else
|
||||
$(QUIETLY) test -f $(LIBSAPROC_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBSAPROC_DEBUGINFO) || \
|
||||
cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO)
|
||||
endif
|
||||
$(QUIETLY) test -f $(LIBSAPROC_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBSAPROC_DIZ) || \
|
||||
cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"
|
||||
|
||||
|
@ -128,7 +128,7 @@ the_vm: vm_build_preliminaries $(adjust-mflags)
|
||||
@$(UpdatePCH)
|
||||
@$(MAKE) -f vm.make $(MFLAGS-adjusted)
|
||||
|
||||
install gamma: the_vm
|
||||
install : the_vm
|
||||
@$(MAKE) -f vm.make $@
|
||||
|
||||
# next rules support "make foo.[ois]"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -367,13 +367,13 @@ DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
|
||||
install_jvm: $(LIBJVM)
|
||||
@echo "Copying $(LIBJVM) to $(DEST_JVM)"
|
||||
ifeq ($(OS_VENDOR), Darwin)
|
||||
$(QUIETLY) test -d $(LIBJVM_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -d $(LIBJVM_DEBUGINFO) || \
|
||||
cp -f -r $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
|
||||
else
|
||||
$(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \
|
||||
cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
|
||||
endif
|
||||
$(QUIETLY) test -f $(LIBJVM_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DIZ) || \
|
||||
cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
|
||||
|
||||
|
@ -176,11 +176,15 @@ ifeq ($(OS),)
|
||||
HOST := $(shell uname -n)
|
||||
endif
|
||||
|
||||
# If not SunOS, not Linux and not BSD, assume Windows
|
||||
# If not SunOS, not Linux not BSD and not AIX, assume Windows
|
||||
ifneq ($(OS), Linux)
|
||||
ifneq ($(OS), SunOS)
|
||||
ifneq ($(OS), bsd)
|
||||
OSNAME=windows
|
||||
ifneq ($(OS), AIX)
|
||||
OSNAME=windows
|
||||
else
|
||||
OSNAME=aix
|
||||
endif
|
||||
else
|
||||
OSNAME=bsd
|
||||
endif
|
||||
@ -269,7 +273,7 @@ ifneq ($(OSNAME),windows)
|
||||
|
||||
# Use uname output for SRCARCH, but deal with platform differences. If ARCH
|
||||
# is not explicitly listed below, it is treated as x86.
|
||||
SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc zero,$(ARCH)))
|
||||
SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc ppc64 zero,$(ARCH)))
|
||||
ARCH/ = x86
|
||||
ARCH/sparc = sparc
|
||||
ARCH/sparc64= sparc
|
||||
@ -295,6 +299,11 @@ ifneq ($(OSNAME),windows)
|
||||
BUILDARCH = sparcv9
|
||||
endif
|
||||
endif
|
||||
ifeq ($(BUILDARCH), ppc)
|
||||
ifdef LP64
|
||||
BUILDARCH = ppc64
|
||||
endif
|
||||
endif
|
||||
|
||||
# LIBARCH is 1:1 mapping from BUILDARCH
|
||||
LIBARCH = $(LIBARCH/$(BUILDARCH))
|
||||
@ -303,12 +312,12 @@ ifneq ($(OSNAME),windows)
|
||||
LIBARCH/sparc = sparc
|
||||
LIBARCH/sparcv9 = sparcv9
|
||||
LIBARCH/ia64 = ia64
|
||||
LIBARCH/ppc64 = ppc
|
||||
LIBARCH/ppc64 = ppc64
|
||||
LIBARCH/ppc = ppc
|
||||
LIBARCH/arm = arm
|
||||
LIBARCH/zero = $(ZERO_LIBARCH)
|
||||
|
||||
LP64_ARCH = sparcv9 amd64 ia64 zero
|
||||
LP64_ARCH = sparcv9 amd64 ia64 ppc64 zero
|
||||
endif
|
||||
|
||||
# Required make macro settings for all platforms
|
||||
|
@ -86,7 +86,7 @@ ifeq ($(INCLUDE_ALL_GCS), false)
|
||||
concurrentMark.cpp concurrentMarkThread.cpp dirtyCardQueue.cpp g1AllocRegion.cpp \
|
||||
g1BlockOffsetTable.cpp g1CardCounts.cpp g1CollectedHeap.cpp g1CollectorPolicy.cpp \
|
||||
g1ErgoVerbose.cpp g1GCPhaseTimes.cpp g1HRPrinter.cpp g1HotCardCache.cpp g1Log.cpp \
|
||||
g1MMUTracker.cpp g1MarkSweep.cpp g1MemoryPool.cpp g1MonitoringSupport.cpp \
|
||||
g1MMUTracker.cpp g1MarkSweep.cpp g1MemoryPool.cpp g1MonitoringSupport.cpp g1OopClosures.cpp \
|
||||
g1RemSet.cpp g1RemSetSummary.cpp g1SATBCardTableModRefBS.cpp g1_globals.cpp heapRegion.cpp \
|
||||
g1BiasedArray.cpp heapRegionRemSet.cpp heapRegionSeq.cpp heapRegionSet.cpp heapRegionSets.cpp \
|
||||
ptrQueue.cpp satbQueue.cpp sparsePRT.cpp survRateGroup.cpp vm_operations_g1.cpp \
|
||||
|
@ -49,7 +49,7 @@ then
|
||||
GDB=gdb
|
||||
fi
|
||||
|
||||
# This is the name of the gdb binary to use
|
||||
# This is the name of the dbx binary to use
|
||||
if [ ! "$DBX" ]
|
||||
then
|
||||
DBX=dbx
|
||||
@ -68,9 +68,16 @@ EMACS=emacs
|
||||
# End of user changeable parameters -----------------------------------------
|
||||
#
|
||||
|
||||
OS=`uname -s`
|
||||
|
||||
# Make sure the paths are fully specified, i.e. they must begin with /.
|
||||
REL_MYDIR=`dirname $0`
|
||||
MYDIR=`cd $REL_MYDIR && pwd`
|
||||
case "$OS" in
|
||||
CYGWIN*)
|
||||
MYDIR=`cygpath -m "$MYDIR"`
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Look whether the user wants to run inside gdb
|
||||
@ -102,8 +109,17 @@ else
|
||||
JDK=@@JDK_IMPORT_PATH@@
|
||||
fi
|
||||
|
||||
if [ "${JDK}" = "" ]; then
|
||||
echo "Failed to find JDK. Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty."
|
||||
if [ "${JDK}" != "" ]; then
|
||||
case "$OS" in
|
||||
CYGWIN*)
|
||||
JDK=`cygpath -m "$JDK"`
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
echo "Failed to find JDK." \
|
||||
"Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We will set the LD_LIBRARY_PATH as follows:
|
||||
@ -120,7 +136,6 @@ SBP=${MYDIR}:${JRE}/lib/${ARCH}
|
||||
|
||||
|
||||
# Set up a suitable LD_LIBRARY_PATH or DYLD_LIBRARY_PATH
|
||||
OS=`uname -s`
|
||||
if [ "${OS}" = "Darwin" ]
|
||||
then
|
||||
if [ -z "$DYLD_LIBRARY_PATH" ]
|
||||
@ -141,7 +156,7 @@ else
|
||||
export LD_LIBRARY_PATH
|
||||
fi
|
||||
|
||||
JPARMS="-Dsun.java.launcher=gamma -XXaltjvm=$MYDIR $@ $JAVA_ARGS";
|
||||
JPARMS="-XXaltjvm=$MYDIR -Dsun.java.launcher.is_altjvm=true $@ $JAVA_ARGS";
|
||||
|
||||
# Locate the java launcher
|
||||
LAUNCHER=$JDK/bin/java
|
||||
@ -152,6 +167,11 @@ fi
|
||||
|
||||
GDBSRCDIR=$MYDIR
|
||||
BASEDIR=`cd $MYDIR/../../.. && pwd`
|
||||
case "$OS" in
|
||||
CYGWIN*)
|
||||
BASEDIR=`cygpath -m "$BASEDIR"`
|
||||
;;
|
||||
esac
|
||||
|
||||
init_gdb() {
|
||||
# Create a gdb script in case we should run inside gdb
|
||||
|
@ -124,7 +124,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
|
||||
# For dependencies and recursive makes.
|
||||
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
|
||||
|
||||
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make
|
||||
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make trace.make sa.make dtrace.make
|
||||
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
|
||||
SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
|
||||
@ -193,6 +193,7 @@ DATA_MODE/i486 = 32
|
||||
DATA_MODE/sparc = 32
|
||||
DATA_MODE/sparcv9 = 64
|
||||
DATA_MODE/amd64 = 64
|
||||
DATA_MODE/ppc64 = 64
|
||||
|
||||
DATA_MODE = $(DATA_MODE/$(BUILDARCH))
|
||||
|
||||
@ -361,6 +362,16 @@ sa.make: $(BUILDTREE_MAKE)
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
dtrace.make: $(BUILDTREE_MAKE)
|
||||
@echo Creating $@ ...
|
||||
$(QUIETLY) ( \
|
||||
$(BUILDTREE_COMMENT); \
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
FORCE:
|
||||
|
||||
.PHONY: all FORCE
|
||||
|
@ -120,6 +120,15 @@ ifeq ($(ARCH), ppc)
|
||||
HS_ARCH = ppc
|
||||
endif
|
||||
|
||||
# PPC64
|
||||
ifeq ($(ARCH), ppc64)
|
||||
ARCH_DATA_MODEL = 64
|
||||
MAKE_ARGS += LP64=1
|
||||
PLATFORM = linux-ppc64
|
||||
VM_PLATFORM = linux_ppc64
|
||||
HS_ARCH = ppc
|
||||
endif
|
||||
|
||||
# On 32 bit linux we build server and client, on 64 bit just server.
|
||||
ifeq ($(JVM_VARIANTS),)
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
@ -255,7 +264,7 @@ EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
|
||||
EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
|
||||
EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal
|
||||
|
||||
ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
|
||||
ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK) $(JVM_VARIANT_CORE)), true)
|
||||
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
|
||||
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
|
||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
|
@ -42,18 +42,39 @@ ifneq ($(ALT_SDT_H),)
|
||||
else
|
||||
SDT_H_FILE = /usr/include/sys/sdt.h
|
||||
endif
|
||||
|
||||
DTRACE_ENABLED = $(shell test -f $(SDT_H_FILE) && echo $(SDT_H_FILE))
|
||||
REASON = "$(SDT_H_FILE) not found"
|
||||
|
||||
ifneq ($(DTRACE_ENABLED),)
|
||||
CFLAGS += -DDTRACE_ENABLED
|
||||
endif
|
||||
endif # GCC version
|
||||
endif # OPENJDK
|
||||
|
||||
endif
|
||||
|
||||
DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace
|
||||
DTRACE_PROG = dtrace
|
||||
DtraceOutDir = $(GENERATED)/dtracefiles
|
||||
|
||||
$(DtraceOutDir):
|
||||
mkdir $(DtraceOutDir)
|
||||
|
||||
$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d
|
||||
|
||||
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d
|
||||
|
||||
$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d
|
||||
|
||||
ifneq ($(DTRACE_ENABLED),)
|
||||
CFLAGS += -DDTRACE_ENABLED
|
||||
dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
|
||||
else
|
||||
dtrace_gen_headers:
|
||||
$(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)"
|
||||
endif
|
||||
|
||||
# Phony target used in vm.make build target to check whether enabled.
|
||||
.PHONY: dtraceCheck
|
||||
ifeq ($(DTRACE_ENABLED),)
|
||||
dtraceCheck:
|
||||
$(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)"
|
||||
@ -61,5 +82,7 @@ else
|
||||
dtraceCheck:
|
||||
endif
|
||||
|
||||
.PHONY: dtrace_gen_headers dtraceCheck
|
||||
|
||||
# It doesn't support HAVE_DTRACE_H though.
|
||||
|
||||
|
@ -181,6 +181,7 @@ ARCHFLAG/zero = $(ZERO_ARCHFLAG)
|
||||
ifndef E500V2
|
||||
ARCHFLAG/ppc = -mcpu=powerpc
|
||||
endif
|
||||
ARCHFLAG/ppc64 = -m64
|
||||
|
||||
CFLAGS += $(ARCHFLAG)
|
||||
AOUT_FLAGS += $(ARCHFLAG)
|
||||
@ -214,7 +215,7 @@ ifeq ($(USE_CLANG), true)
|
||||
WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
|
||||
endif
|
||||
|
||||
WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
|
||||
WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wno-error=format-nonliteral
|
||||
|
||||
ifeq ($(USE_CLANG),)
|
||||
# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
|
||||
@ -346,6 +347,7 @@ else
|
||||
DEBUG_CFLAGS/amd64 = -g
|
||||
DEBUG_CFLAGS/arm = -g
|
||||
DEBUG_CFLAGS/ppc = -g
|
||||
DEBUG_CFLAGS/ppc64 = -g
|
||||
DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
|
||||
ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
|
||||
ifeq ($(USE_CLANG), true)
|
||||
@ -361,6 +363,7 @@ else
|
||||
FASTDEBUG_CFLAGS/amd64 = -g
|
||||
FASTDEBUG_CFLAGS/arm = -g
|
||||
FASTDEBUG_CFLAGS/ppc = -g
|
||||
FASTDEBUG_CFLAGS/ppc64 = -g
|
||||
FASTDEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
|
||||
ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)
|
||||
ifeq ($(USE_CLANG), true)
|
||||
@ -375,6 +378,7 @@ else
|
||||
OPT_CFLAGS/amd64 = -g
|
||||
OPT_CFLAGS/arm = -g
|
||||
OPT_CFLAGS/ppc = -g
|
||||
OPT_CFLAGS/ppc64 = -g
|
||||
OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
|
||||
ifeq ($(OPT_CFLAGS/$(BUILDARCH)),)
|
||||
ifeq ($(USE_CLANG), true)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -74,9 +74,9 @@ endif
|
||||
|
||||
install_jsig: $(LIBJSIG)
|
||||
@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
|
||||
$(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \
|
||||
cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
|
||||
$(QUIETLY) test -f $(LIBJSIG_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \
|
||||
cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
39
hotspot/make/linux/makefiles/ppc64.make
Normal file
39
hotspot/make/linux/makefiles/ppc64.make
Normal file
@ -0,0 +1,39 @@
|
||||
#
|
||||
# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# make c code know it is on a 64 bit platform.
|
||||
CFLAGS += -D_LP64=1
|
||||
|
||||
# fixes `relocation truncated to fit' error for gcc 4.1.
|
||||
CFLAGS += -mminimal-toc
|
||||
|
||||
# finds use ppc64 instructions, but schedule for power5
|
||||
CFLAGS += -mcpu=powerpc64 -mtune=power5 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
|
||||
|
||||
# let linker find external 64 bit libs.
|
||||
LFLAGS_VM += -L/lib64
|
||||
|
||||
# specify lib format.
|
||||
LFLAGS_VM += -Wl,-melf64ppc
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -113,13 +113,13 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
endif
|
||||
|
||||
install_saproc: $(BUILDLIBSAPROC)
|
||||
$(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \
|
||||
echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
|
||||
test -f $(LIBSAPROC_DEBUGINFO) && \
|
||||
$(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \
|
||||
echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
|
||||
test ! -f $(LIBSAPROC_DEBUGINFO) || \
|
||||
cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
|
||||
test -f $(LIBSAPROC_DIZ) && \
|
||||
cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
|
||||
cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
|
||||
test ! -f $(LIBSAPROC_DIZ) || \
|
||||
cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
|
||||
cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
|
||||
fi
|
||||
|
||||
.PHONY: install_saproc
|
||||
|
@ -80,7 +80,7 @@ default: vm_build_preliminaries the_vm
|
||||
@echo All done.
|
||||
|
||||
# This is an explicit dependency for the sake of parallel makes.
|
||||
vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) trace_stuff jvmti_stuff sa_stuff
|
||||
vm_build_preliminaries: checks $(Cached_plat) $(AD_Files_If_Required) trace_stuff jvmti_stuff sa_stuff dtrace_stuff
|
||||
@# We need a null action here, so implicit rules don't get consulted.
|
||||
|
||||
$(Cached_plat): $(Plat_File)
|
||||
@ -102,6 +102,9 @@ trace_stuff: jvmti_stuff $(Cached_plat) $(adjust-mflags)
|
||||
sa_stuff:
|
||||
@$(MAKE) -f sa.make $(MFLAGS-adjusted)
|
||||
|
||||
dtrace_stuff: $(Cached_plat) $(adjust-mflags)
|
||||
@$(MAKE) -f dtrace.make dtrace_gen_headers $(MFLAGS-adjusted) GENERATED=$(GENERATED)
|
||||
|
||||
# and the VM: must use other makefile with dependencies included
|
||||
|
||||
# We have to go to great lengths to get control over the -jN argument
|
||||
@ -119,7 +122,7 @@ the_vm: vm_build_preliminaries $(adjust-mflags)
|
||||
@$(UpdatePCH)
|
||||
@$(MAKE) -f vm.make $(MFLAGS-adjusted)
|
||||
|
||||
install gamma: the_vm
|
||||
install: the_vm
|
||||
@$(MAKE) -f vm.make $@
|
||||
|
||||
# next rules support "make foo.[ois]"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -366,9 +366,9 @@ DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
|
||||
|
||||
install_jvm: $(LIBJVM)
|
||||
@echo "Copying $(LIBJVM) to $(DEST_JVM)"
|
||||
$(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \
|
||||
cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
|
||||
$(QUIETLY) test -f $(LIBJVM_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DIZ) || \
|
||||
cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
|
||||
|
||||
|
@ -2,11 +2,11 @@ os_family = linux
|
||||
|
||||
arch = ppc
|
||||
|
||||
arch_model = ppc
|
||||
arch_model = ppc_32
|
||||
|
||||
os_arch = linux_ppc
|
||||
|
||||
os_arch_model = linux_ppc
|
||||
os_arch_model = linux_ppc_32
|
||||
|
||||
lib_arch = ppc
|
||||
|
||||
@ -14,4 +14,4 @@ compiler = gcc
|
||||
|
||||
gnu_dis_arch = ppc
|
||||
|
||||
sysdefs = -DLINUX -D_GNU_SOURCE -DPPC
|
||||
sysdefs = -DLINUX -D_GNU_SOURCE -DPPC32
|
||||
|
17
hotspot/make/linux/platform_ppc64
Normal file
17
hotspot/make/linux/platform_ppc64
Normal file
@ -0,0 +1,17 @@
|
||||
os_family = linux
|
||||
|
||||
arch = ppc
|
||||
|
||||
arch_model = ppc_64
|
||||
|
||||
os_arch = linux_ppc
|
||||
|
||||
os_arch_model = linux_ppc_64
|
||||
|
||||
lib_arch = ppc64
|
||||
|
||||
compiler = gcc
|
||||
|
||||
gnu_dis_arch = ppc64
|
||||
|
||||
sysdefs = -DLINUX -D_GNU_SOURCE -DPPC64
|
@ -55,6 +55,7 @@ JVMOFFS.o = $(JVMOFFS).o
|
||||
GENOFFS = generate$(JVMOFFS)
|
||||
|
||||
DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace
|
||||
DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace
|
||||
DTRACE = dtrace
|
||||
DTRACE.o = $(DTRACE).o
|
||||
|
||||
@ -253,8 +254,8 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \
|
||||
$(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d
|
||||
$(DTRACE).d: $(DTRACE_COMMON_SRCDIR)/hotspot.d $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d \
|
||||
$(DTRACE_COMMON_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d
|
||||
$(QUIETLY) cat $^ > $@
|
||||
|
||||
DTraced_Files = ciEnv.o \
|
||||
@ -332,14 +333,14 @@ $(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
|
||||
$(DtraceOutDir):
|
||||
mkdir $(DtraceOutDir)
|
||||
|
||||
$(DtraceOutDir)/hotspot.h: $(DTRACE_SRCDIR)/hotspot.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot.d
|
||||
$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d
|
||||
|
||||
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot_jni.d
|
||||
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d
|
||||
|
||||
$(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d
|
||||
$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir)
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d
|
||||
|
||||
dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
|
||||
|
||||
|
@ -118,7 +118,7 @@ endif
|
||||
# Compiler warnings are treated as errors
|
||||
WARNINGS_ARE_ERRORS = -Werror
|
||||
# Enable these warnings. See 'info gcc' about details on these options
|
||||
WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef
|
||||
WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef -Wformat=2 -Wno-error=format-nonliteral
|
||||
CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
|
||||
# Special cases
|
||||
CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -79,9 +79,9 @@ endif
|
||||
|
||||
install_jsig: $(LIBJSIG)
|
||||
@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
|
||||
$(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \
|
||||
cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
|
||||
$(QUIETLY) test -f $(LIBJSIG_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \
|
||||
cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
# Sets make macros for making optimized version of Gamma VM
|
||||
# Sets make macros for making optimized version of HotSpot VM
|
||||
# (This is the "product", not the "release" version.)
|
||||
|
||||
# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -147,13 +147,13 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
endif
|
||||
|
||||
install_saproc: $(BULDLIBSAPROC)
|
||||
$(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \
|
||||
echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
|
||||
test -f $(LIBSAPROC_DEBUGINFO) && \
|
||||
$(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \
|
||||
echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
|
||||
test ! -f $(LIBSAPROC_DEBUGINFO) || \
|
||||
cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
|
||||
test -f $(LIBSAPROC_DIZ) && \
|
||||
cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
|
||||
cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
|
||||
test ! -f $(LIBSAPROC_DIZ) || \
|
||||
cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
|
||||
cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
|
||||
fi
|
||||
|
||||
.PHONY: install_saproc
|
||||
|
@ -114,7 +114,7 @@ $(adjust-mflags): $(GAMMADIR)/make/$(Platform_os_family)/makefiles/adjust-mflags
|
||||
the_vm: vm_build_preliminaries $(adjust-mflags)
|
||||
@$(MAKE) -f vm.make $(MFLAGS-adjusted)
|
||||
|
||||
install gamma: the_vm
|
||||
install: the_vm
|
||||
@$(MAKE) -f vm.make $@
|
||||
|
||||
# next rules support "make foo.[oi]"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -333,9 +333,9 @@ DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
|
||||
|
||||
install_jvm: $(LIBJVM)
|
||||
@echo "Copying $(LIBJVM) to $(DEST_JVM)"
|
||||
$(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \
|
||||
cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
|
||||
$(QUIETLY) test -f $(LIBJVM_DIZ) && \
|
||||
$(QUIETLY) test ! -f $(LIBJVM_DIZ) || \
|
||||
cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
|
||||
$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
|
||||
|
||||
|
@ -72,6 +72,7 @@ ProjectCreatorIncludesPRIVATE=\
|
||||
-ignorePath arm \
|
||||
-ignorePath ppc \
|
||||
-ignorePath zero \
|
||||
-ignorePath aix \
|
||||
-hidePath .hg
|
||||
|
||||
|
||||
|
699
hotspot/src/cpu/ppc/vm/assembler_ppc.cpp
Normal file
699
hotspot/src/cpu/ppc/vm/assembler_ppc.cpp
Normal file
@ -0,0 +1,699 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "asm/assembler.inline.hpp"
|
||||
#include "gc_interface/collectedHeap.inline.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "memory/cardTableModRefBS.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "prims/methodHandles.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/interfaceSupport.hpp"
|
||||
#include "runtime/objectMonitor.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||
#include "gc_implementation/g1/heapRegion.hpp"
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
#ifdef PRODUCT
|
||||
#define BLOCK_COMMENT(str) // nothing
|
||||
#else
|
||||
#define BLOCK_COMMENT(str) block_comment(str)
|
||||
#endif
|
||||
|
||||
int AbstractAssembler::code_fill_byte() {
|
||||
return 0x00; // illegal instruction 0x00000000
|
||||
}
|
||||
|
||||
void Assembler::print_instruction(int inst) {
|
||||
Unimplemented();
|
||||
}
|
||||
|
||||
// Patch instruction `inst' at offset `inst_pos' to refer to
|
||||
// `dest_pos' and return the resulting instruction. We should have
|
||||
// pcs, not offsets, but since all is relative, it will work out fine.
|
||||
int Assembler::patched_branch(int dest_pos, int inst, int inst_pos) {
|
||||
int m = 0; // mask for displacement field
|
||||
int v = 0; // new value for displacement field
|
||||
|
||||
switch (inv_op_ppc(inst)) {
|
||||
case b_op: m = li(-1); v = li(disp(dest_pos, inst_pos)); break;
|
||||
case bc_op: m = bd(-1); v = bd(disp(dest_pos, inst_pos)); break;
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
return inst & ~m | v;
|
||||
}
|
||||
|
||||
// Return the offset, relative to _code_begin, of the destination of
|
||||
// the branch inst at offset pos.
|
||||
int Assembler::branch_destination(int inst, int pos) {
|
||||
int r = 0;
|
||||
switch (inv_op_ppc(inst)) {
|
||||
case b_op: r = bxx_destination_offset(inst, pos); break;
|
||||
case bc_op: r = inv_bd_field(inst, pos); break;
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
// Low-level andi-one-instruction-macro.
|
||||
void Assembler::andi(Register a, Register s, const int ui16) {
|
||||
assert(is_uimm(ui16, 16), "must be 16-bit unsigned immediate");
|
||||
if (is_power_of_2_long(((jlong) ui16)+1)) {
|
||||
// pow2minus1
|
||||
clrldi(a, s, 64-log2_long((((jlong) ui16)+1)));
|
||||
} else if (is_power_of_2_long((jlong) ui16)) {
|
||||
// pow2
|
||||
rlwinm(a, s, 0, 31-log2_long((jlong) ui16), 31-log2_long((jlong) ui16));
|
||||
} else if (is_power_of_2_long((jlong)-ui16)) {
|
||||
// negpow2
|
||||
clrrdi(a, s, log2_long((jlong)-ui16));
|
||||
} else {
|
||||
andi_(a, s, ui16);
|
||||
}
|
||||
}
|
||||
|
||||
// RegisterOrConstant version.
|
||||
void Assembler::ld(Register d, RegisterOrConstant roc, Register s1) {
|
||||
if (roc.is_constant()) {
|
||||
if (s1 == noreg) {
|
||||
int simm16_rest = load_const_optimized(d, roc.as_constant(), noreg, true);
|
||||
Assembler::ld(d, simm16_rest, d);
|
||||
} else if (is_simm(roc.as_constant(), 16)) {
|
||||
Assembler::ld(d, roc.as_constant(), s1);
|
||||
} else {
|
||||
load_const_optimized(d, roc.as_constant());
|
||||
Assembler::ldx(d, d, s1);
|
||||
}
|
||||
} else {
|
||||
if (s1 == noreg)
|
||||
Assembler::ld(d, 0, roc.as_register());
|
||||
else
|
||||
Assembler::ldx(d, roc.as_register(), s1);
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::lwa(Register d, RegisterOrConstant roc, Register s1) {
|
||||
if (roc.is_constant()) {
|
||||
if (s1 == noreg) {
|
||||
int simm16_rest = load_const_optimized(d, roc.as_constant(), noreg, true);
|
||||
Assembler::lwa(d, simm16_rest, d);
|
||||
} else if (is_simm(roc.as_constant(), 16)) {
|
||||
Assembler::lwa(d, roc.as_constant(), s1);
|
||||
} else {
|
||||
load_const_optimized(d, roc.as_constant());
|
||||
Assembler::lwax(d, d, s1);
|
||||
}
|
||||
} else {
|
||||
if (s1 == noreg)
|
||||
Assembler::lwa(d, 0, roc.as_register());
|
||||
else
|
||||
Assembler::lwax(d, roc.as_register(), s1);
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::lwz(Register d, RegisterOrConstant roc, Register s1) {
|
||||
if (roc.is_constant()) {
|
||||
if (s1 == noreg) {
|
||||
int simm16_rest = load_const_optimized(d, roc.as_constant(), noreg, true);
|
||||
Assembler::lwz(d, simm16_rest, d);
|
||||
} else if (is_simm(roc.as_constant(), 16)) {
|
||||
Assembler::lwz(d, roc.as_constant(), s1);
|
||||
} else {
|
||||
load_const_optimized(d, roc.as_constant());
|
||||
Assembler::lwzx(d, d, s1);
|
||||
}
|
||||
} else {
|
||||
if (s1 == noreg)
|
||||
Assembler::lwz(d, 0, roc.as_register());
|
||||
else
|
||||
Assembler::lwzx(d, roc.as_register(), s1);
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::lha(Register d, RegisterOrConstant roc, Register s1) {
|
||||
if (roc.is_constant()) {
|
||||
if (s1 == noreg) {
|
||||
int simm16_rest = load_const_optimized(d, roc.as_constant(), noreg, true);
|
||||
Assembler::lha(d, simm16_rest, d);
|
||||
} else if (is_simm(roc.as_constant(), 16)) {
|
||||
Assembler::lha(d, roc.as_constant(), s1);
|
||||
} else {
|
||||
load_const_optimized(d, roc.as_constant());
|
||||
Assembler::lhax(d, d, s1);
|
||||
}
|
||||
} else {
|
||||
if (s1 == noreg)
|
||||
Assembler::lha(d, 0, roc.as_register());
|
||||
else
|
||||
Assembler::lhax(d, roc.as_register(), s1);
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::lhz(Register d, RegisterOrConstant roc, Register s1) {
|
||||
if (roc.is_constant()) {
|
||||
if (s1 == noreg) {
|
||||
int simm16_rest = load_const_optimized(d, roc.as_constant(), noreg, true);
|
||||
Assembler::lhz(d, simm16_rest, d);
|
||||
} else if (is_simm(roc.as_constant(), 16)) {
|
||||
Assembler::lhz(d, roc.as_constant(), s1);
|
||||
} else {
|
||||
load_const_optimized(d, roc.as_constant());
|
||||
Assembler::lhzx(d, d, s1);
|
||||
}
|
||||
} else {
|
||||
if (s1 == noreg)
|
||||
Assembler::lhz(d, 0, roc.as_register());
|
||||
else
|
||||
Assembler::lhzx(d, roc.as_register(), s1);
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::lbz(Register d, RegisterOrConstant roc, Register s1) {
|
||||
if (roc.is_constant()) {
|
||||
if (s1 == noreg) {
|
||||
int simm16_rest = load_const_optimized(d, roc.as_constant(), noreg, true);
|
||||
Assembler::lbz(d, simm16_rest, d);
|
||||
} else if (is_simm(roc.as_constant(), 16)) {
|
||||
Assembler::lbz(d, roc.as_constant(), s1);
|
||||
} else {
|
||||
load_const_optimized(d, roc.as_constant());
|
||||
Assembler::lbzx(d, d, s1);
|
||||
}
|
||||
} else {
|
||||
if (s1 == noreg)
|
||||
Assembler::lbz(d, 0, roc.as_register());
|
||||
else
|
||||
Assembler::lbzx(d, roc.as_register(), s1);
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::std(Register d, RegisterOrConstant roc, Register s1, Register tmp) {
|
||||
if (roc.is_constant()) {
|
||||
if (s1 == noreg) {
|
||||
guarantee(tmp != noreg, "Need tmp reg to encode large constants");
|
||||
int simm16_rest = load_const_optimized(tmp, roc.as_constant(), noreg, true);
|
||||
Assembler::std(d, simm16_rest, tmp);
|
||||
} else if (is_simm(roc.as_constant(), 16)) {
|
||||
Assembler::std(d, roc.as_constant(), s1);
|
||||
} else {
|
||||
guarantee(tmp != noreg, "Need tmp reg to encode large constants");
|
||||
load_const_optimized(tmp, roc.as_constant());
|
||||
Assembler::stdx(d, tmp, s1);
|
||||
}
|
||||
} else {
|
||||
if (s1 == noreg)
|
||||
Assembler::std(d, 0, roc.as_register());
|
||||
else
|
||||
Assembler::stdx(d, roc.as_register(), s1);
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::stw(Register d, RegisterOrConstant roc, Register s1, Register tmp) {
|
||||
if (roc.is_constant()) {
|
||||
if (s1 == noreg) {
|
||||
guarantee(tmp != noreg, "Need tmp reg to encode large constants");
|
||||
int simm16_rest = load_const_optimized(tmp, roc.as_constant(), noreg, true);
|
||||
Assembler::stw(d, simm16_rest, tmp);
|
||||
} else if (is_simm(roc.as_constant(), 16)) {
|
||||
Assembler::stw(d, roc.as_constant(), s1);
|
||||
} else {
|
||||
guarantee(tmp != noreg, "Need tmp reg to encode large constants");
|
||||
load_const_optimized(tmp, roc.as_constant());
|
||||
Assembler::stwx(d, tmp, s1);
|
||||
}
|
||||
} else {
|
||||
if (s1 == noreg)
|
||||
Assembler::stw(d, 0, roc.as_register());
|
||||
else
|
||||
Assembler::stwx(d, roc.as_register(), s1);
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::sth(Register d, RegisterOrConstant roc, Register s1, Register tmp) {
|
||||
if (roc.is_constant()) {
|
||||
if (s1 == noreg) {
|
||||
guarantee(tmp != noreg, "Need tmp reg to encode large constants");
|
||||
int simm16_rest = load_const_optimized(tmp, roc.as_constant(), noreg, true);
|
||||
Assembler::sth(d, simm16_rest, tmp);
|
||||
} else if (is_simm(roc.as_constant(), 16)) {
|
||||
Assembler::sth(d, roc.as_constant(), s1);
|
||||
} else {
|
||||
guarantee(tmp != noreg, "Need tmp reg to encode large constants");
|
||||
load_const_optimized(tmp, roc.as_constant());
|
||||
Assembler::sthx(d, tmp, s1);
|
||||
}
|
||||
} else {
|
||||
if (s1 == noreg)
|
||||
Assembler::sth(d, 0, roc.as_register());
|
||||
else
|
||||
Assembler::sthx(d, roc.as_register(), s1);
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::stb(Register d, RegisterOrConstant roc, Register s1, Register tmp) {
|
||||
if (roc.is_constant()) {
|
||||
if (s1 == noreg) {
|
||||
guarantee(tmp != noreg, "Need tmp reg to encode large constants");
|
||||
int simm16_rest = load_const_optimized(tmp, roc.as_constant(), noreg, true);
|
||||
Assembler::stb(d, simm16_rest, tmp);
|
||||
} else if (is_simm(roc.as_constant(), 16)) {
|
||||
Assembler::stb(d, roc.as_constant(), s1);
|
||||
} else {
|
||||
guarantee(tmp != noreg, "Need tmp reg to encode large constants");
|
||||
load_const_optimized(tmp, roc.as_constant());
|
||||
Assembler::stbx(d, tmp, s1);
|
||||
}
|
||||
} else {
|
||||
if (s1 == noreg)
|
||||
Assembler::stb(d, 0, roc.as_register());
|
||||
else
|
||||
Assembler::stbx(d, roc.as_register(), s1);
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::add(Register d, RegisterOrConstant roc, Register s1) {
|
||||
if (roc.is_constant()) {
|
||||
intptr_t c = roc.as_constant();
|
||||
assert(is_simm(c, 16), "too big");
|
||||
addi(d, s1, (int)c);
|
||||
}
|
||||
else add(d, roc.as_register(), s1);
|
||||
}
|
||||
|
||||
void Assembler::subf(Register d, RegisterOrConstant roc, Register s1) {
|
||||
if (roc.is_constant()) {
|
||||
intptr_t c = roc.as_constant();
|
||||
assert(is_simm(-c, 16), "too big");
|
||||
addi(d, s1, (int)-c);
|
||||
}
|
||||
else subf(d, roc.as_register(), s1);
|
||||
}
|
||||
|
||||
void Assembler::cmpd(ConditionRegister d, RegisterOrConstant roc, Register s1) {
|
||||
if (roc.is_constant()) {
|
||||
intptr_t c = roc.as_constant();
|
||||
assert(is_simm(c, 16), "too big");
|
||||
cmpdi(d, s1, (int)c);
|
||||
}
|
||||
else cmpd(d, roc.as_register(), s1);
|
||||
}
|
||||
|
||||
// Load a 64 bit constant. Patchable.
|
||||
void Assembler::load_const(Register d, long x, Register tmp) {
|
||||
// 64-bit value: x = xa xb xc xd
|
||||
int xa = (x >> 48) & 0xffff;
|
||||
int xb = (x >> 32) & 0xffff;
|
||||
int xc = (x >> 16) & 0xffff;
|
||||
int xd = (x >> 0) & 0xffff;
|
||||
if (tmp == noreg) {
|
||||
Assembler::lis( d, (int)(short)xa);
|
||||
Assembler::ori( d, d, (unsigned int)xb);
|
||||
Assembler::sldi(d, d, 32);
|
||||
Assembler::oris(d, d, (unsigned int)xc);
|
||||
Assembler::ori( d, d, (unsigned int)xd);
|
||||
} else {
|
||||
// exploit instruction level parallelism if we have a tmp register
|
||||
assert_different_registers(d, tmp);
|
||||
Assembler::lis(tmp, (int)(short)xa);
|
||||
Assembler::lis(d, (int)(short)xc);
|
||||
Assembler::ori(tmp, tmp, (unsigned int)xb);
|
||||
Assembler::ori(d, d, (unsigned int)xd);
|
||||
Assembler::insrdi(d, tmp, 32, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Load a 64 bit constant, optimized, not identifyable.
|
||||
// Tmp can be used to increase ILP. Set return_simm16_rest=true to get a
|
||||
// 16 bit immediate offset.
|
||||
int Assembler::load_const_optimized(Register d, long x, Register tmp, bool return_simm16_rest) {
|
||||
// Avoid accidentally trying to use R0 for indexed addressing.
|
||||
assert(d != R0, "R0 not allowed");
|
||||
assert_different_registers(d, tmp);
|
||||
|
||||
short xa, xb, xc, xd; // Four 16-bit chunks of const.
|
||||
long rem = x; // Remaining part of const.
|
||||
|
||||
xd = rem & 0xFFFF; // Lowest 16-bit chunk.
|
||||
rem = (rem >> 16) + ((unsigned short)xd >> 15); // Compensation for sign extend.
|
||||
|
||||
if (rem == 0) { // opt 1: simm16
|
||||
li(d, xd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
xc = rem & 0xFFFF; // Next 16-bit chunk.
|
||||
rem = (rem >> 16) + ((unsigned short)xc >> 15); // Compensation for sign extend.
|
||||
|
||||
if (rem == 0) { // opt 2: simm32
|
||||
lis(d, xc);
|
||||
} else { // High 32 bits needed.
|
||||
|
||||
if (tmp != noreg) { // opt 3: We have a temp reg.
|
||||
// No carry propagation between xc and higher chunks here (use logical instructions).
|
||||
xa = (x >> 48) & 0xffff;
|
||||
xb = (x >> 32) & 0xffff; // No sign compensation, we use lis+ori or li to allow usage of R0.
|
||||
bool load_xa = (xa != 0) || (xb < 0);
|
||||
bool return_xd = false;
|
||||
|
||||
if (load_xa) lis(tmp, xa);
|
||||
if (xc) lis(d, xc);
|
||||
if (load_xa) {
|
||||
if (xb) ori(tmp, tmp, xb); // No addi, we support tmp == R0.
|
||||
} else {
|
||||
li(tmp, xb); // non-negative
|
||||
}
|
||||
if (xc) {
|
||||
if (return_simm16_rest && xd >= 0) { return_xd = true; } // >= 0 to avoid carry propagation after insrdi/rldimi.
|
||||
else if (xd) { addi(d, d, xd); }
|
||||
} else {
|
||||
li(d, xd);
|
||||
}
|
||||
insrdi(d, tmp, 32, 0);
|
||||
return return_xd ? xd : 0; // non-negative
|
||||
}
|
||||
|
||||
xb = rem & 0xFFFF; // Next 16-bit chunk.
|
||||
rem = (rem >> 16) + ((unsigned short)xb >> 15); // Compensation for sign extend.
|
||||
|
||||
xa = rem & 0xFFFF; // Highest 16-bit chunk.
|
||||
|
||||
// opt 4: avoid adding 0
|
||||
if (xa) { // Highest 16-bit needed?
|
||||
lis(d, xa);
|
||||
if (xb) addi(d, d, xb);
|
||||
} else {
|
||||
li(d, xb);
|
||||
}
|
||||
sldi(d, d, 32);
|
||||
if (xc) addis(d, d, xc);
|
||||
}
|
||||
|
||||
// opt 5: Return offset to be inserted into following instruction.
|
||||
if (return_simm16_rest) return xd;
|
||||
|
||||
if (xd) addi(d, d, xd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
// Test of ppc assembler.
|
||||
void Assembler::test_asm() {
|
||||
// PPC 1, section 3.3.8, Fixed-Point Arithmetic Instructions
|
||||
addi( R0, R1, 10);
|
||||
addis( R5, R2, 11);
|
||||
addic_( R3, R31, 42);
|
||||
subfic( R21, R12, 2112);
|
||||
add( R3, R2, R1);
|
||||
add_( R11, R22, R30);
|
||||
subf( R7, R6, R5);
|
||||
subf_( R8, R9, R4);
|
||||
addc( R11, R12, R13);
|
||||
addc_( R14, R14, R14);
|
||||
subfc( R15, R16, R17);
|
||||
subfc_( R18, R20, R19);
|
||||
adde( R20, R22, R24);
|
||||
adde_( R29, R27, R26);
|
||||
subfe( R28, R1, R0);
|
||||
subfe_( R21, R11, R29);
|
||||
neg( R21, R22);
|
||||
neg_( R13, R23);
|
||||
mulli( R0, R11, -31);
|
||||
mulld( R1, R18, R21);
|
||||
mulld_( R2, R17, R22);
|
||||
mullw( R3, R16, R23);
|
||||
mullw_( R4, R15, R24);
|
||||
divd( R5, R14, R25);
|
||||
divd_( R6, R13, R26);
|
||||
divw( R7, R12, R27);
|
||||
divw_( R8, R11, R28);
|
||||
|
||||
li( R3, -4711);
|
||||
|
||||
// PPC 1, section 3.3.9, Fixed-Point Compare Instructions
|
||||
cmpi( CCR7, 0, R27, 4711);
|
||||
cmp( CCR0, 1, R14, R11);
|
||||
cmpli( CCR5, 1, R17, 45);
|
||||
cmpl( CCR3, 0, R9, R10);
|
||||
|
||||
cmpwi( CCR7, R27, 4711);
|
||||
cmpw( CCR0, R14, R11);
|
||||
cmplwi( CCR5, R17, 45);
|
||||
cmplw( CCR3, R9, R10);
|
||||
|
||||
cmpdi( CCR7, R27, 4711);
|
||||
cmpd( CCR0, R14, R11);
|
||||
cmpldi( CCR5, R17, 45);
|
||||
cmpld( CCR3, R9, R10);
|
||||
|
||||
// PPC 1, section 3.3.11, Fixed-Point Logical Instructions
|
||||
andi_( R4, R5, 0xff);
|
||||
andis_( R12, R13, 0x7b51);
|
||||
ori( R1, R4, 13);
|
||||
oris( R3, R5, 177);
|
||||
xori( R7, R6, 51);
|
||||
xoris( R29, R0, 1);
|
||||
andr( R17, R21, R16);
|
||||
and_( R3, R5, R15);
|
||||
orr( R2, R1, R9);
|
||||
or_( R17, R15, R11);
|
||||
xorr( R19, R18, R10);
|
||||
xor_( R31, R21, R11);
|
||||
nand( R5, R7, R3);
|
||||
nand_( R3, R1, R0);
|
||||
nor( R2, R3, R5);
|
||||
nor_( R3, R6, R8);
|
||||
andc( R25, R12, R11);
|
||||
andc_( R24, R22, R21);
|
||||
orc( R20, R10, R12);
|
||||
orc_( R22, R2, R13);
|
||||
|
||||
nop();
|
||||
|
||||
// PPC 1, section 3.3.12, Fixed-Point Rotate and Shift Instructions
|
||||
sld( R5, R6, R8);
|
||||
sld_( R3, R5, R9);
|
||||
slw( R2, R1, R10);
|
||||
slw_( R6, R26, R16);
|
||||
srd( R16, R24, R8);
|
||||
srd_( R21, R14, R7);
|
||||
srw( R22, R25, R29);
|
||||
srw_( R5, R18, R17);
|
||||
srad( R7, R11, R0);
|
||||
srad_( R9, R13, R1);
|
||||
sraw( R7, R15, R2);
|
||||
sraw_( R4, R17, R3);
|
||||
sldi( R3, R18, 63);
|
||||
sldi_( R2, R20, 30);
|
||||
slwi( R1, R21, 30);
|
||||
slwi_( R7, R23, 8);
|
||||
srdi( R0, R19, 2);
|
||||
srdi_( R12, R24, 5);
|
||||
srwi( R13, R27, 6);
|
||||
srwi_( R14, R29, 7);
|
||||
sradi( R15, R30, 9);
|
||||
sradi_( R16, R31, 19);
|
||||
srawi( R17, R31, 15);
|
||||
srawi_( R18, R31, 12);
|
||||
|
||||
clrrdi( R3, R30, 5);
|
||||
clrldi( R9, R10, 11);
|
||||
|
||||
rldicr( R19, R20, 13, 15);
|
||||
rldicr_(R20, R20, 16, 14);
|
||||
rldicl( R21, R21, 30, 33);
|
||||
rldicl_(R22, R1, 20, 25);
|
||||
rlwinm( R23, R2, 25, 10, 11);
|
||||
rlwinm_(R24, R3, 12, 13, 14);
|
||||
|
||||
// PPC 1, section 3.3.2 Fixed-Point Load Instructions
|
||||
lwzx( R3, R5, R7);
|
||||
lwz( R11, 0, R1);
|
||||
lwzu( R31, -4, R11);
|
||||
|
||||
lwax( R3, R5, R7);
|
||||
lwa( R31, -4, R11);
|
||||
lhzx( R3, R5, R7);
|
||||
lhz( R31, -4, R11);
|
||||
lhzu( R31, -4, R11);
|
||||
|
||||
|
||||
lhax( R3, R5, R7);
|
||||
lha( R31, -4, R11);
|
||||
lhau( R11, 0, R1);
|
||||
|
||||
lbzx( R3, R5, R7);
|
||||
lbz( R31, -4, R11);
|
||||
lbzu( R11, 0, R1);
|
||||
|
||||
ld( R31, -4, R11);
|
||||
ldx( R3, R5, R7);
|
||||
ldu( R31, -4, R11);
|
||||
|
||||
// PPC 1, section 3.3.3 Fixed-Point Store Instructions
|
||||
stwx( R3, R5, R7);
|
||||
stw( R31, -4, R11);
|
||||
stwu( R11, 0, R1);
|
||||
|
||||
sthx( R3, R5, R7 );
|
||||
sth( R31, -4, R11);
|
||||
sthu( R31, -4, R11);
|
||||
|
||||
stbx( R3, R5, R7);
|
||||
stb( R31, -4, R11);
|
||||
stbu( R31, -4, R11);
|
||||
|
||||
std( R31, -4, R11);
|
||||
stdx( R3, R5, R7);
|
||||
stdu( R31, -4, R11);
|
||||
|
||||
// PPC 1, section 3.3.13 Move To/From System Register Instructions
|
||||
mtlr( R3);
|
||||
mflr( R3);
|
||||
mtctr( R3);
|
||||
mfctr( R3);
|
||||
mtcrf( 0xff, R15);
|
||||
mtcr( R15);
|
||||
mtcrf( 0x03, R15);
|
||||
mtcr( R15);
|
||||
mfcr( R15);
|
||||
|
||||
// PPC 1, section 2.4.1 Branch Instructions
|
||||
Label lbl1, lbl2, lbl3;
|
||||
bind(lbl1);
|
||||
|
||||
b(pc());
|
||||
b(pc() - 8);
|
||||
b(lbl1);
|
||||
b(lbl2);
|
||||
b(lbl3);
|
||||
|
||||
bl(pc() - 8);
|
||||
bl(lbl1);
|
||||
bl(lbl2);
|
||||
|
||||
bcl(4, 10, pc() - 8);
|
||||
bcl(4, 10, lbl1);
|
||||
bcl(4, 10, lbl2);
|
||||
|
||||
bclr( 4, 6, 0);
|
||||
bclrl(4, 6, 0);
|
||||
|
||||
bind(lbl2);
|
||||
|
||||
bcctr( 4, 6, 0);
|
||||
bcctrl(4, 6, 0);
|
||||
|
||||
blt(CCR0, lbl2);
|
||||
bgt(CCR1, lbl2);
|
||||
beq(CCR2, lbl2);
|
||||
bso(CCR3, lbl2);
|
||||
bge(CCR4, lbl2);
|
||||
ble(CCR5, lbl2);
|
||||
bne(CCR6, lbl2);
|
||||
bns(CCR7, lbl2);
|
||||
|
||||
bltl(CCR0, lbl2);
|
||||
bgtl(CCR1, lbl2);
|
||||
beql(CCR2, lbl2);
|
||||
bsol(CCR3, lbl2);
|
||||
bgel(CCR4, lbl2);
|
||||
blel(CCR5, lbl2);
|
||||
bnel(CCR6, lbl2);
|
||||
bnsl(CCR7, lbl2);
|
||||
blr();
|
||||
|
||||
sync();
|
||||
icbi( R1, R2);
|
||||
dcbst(R2, R3);
|
||||
|
||||
// FLOATING POINT instructions ppc.
|
||||
// PPC 1, section 4.6.2 Floating-Point Load Instructions
|
||||
lfs( F1, -11, R3);
|
||||
lfsu(F2, 123, R4);
|
||||
lfsx(F3, R5, R6);
|
||||
lfd( F4, 456, R7);
|
||||
lfdu(F5, 789, R8);
|
||||
lfdx(F6, R10, R11);
|
||||
|
||||
// PPC 1, section 4.6.3 Floating-Point Store Instructions
|
||||
stfs( F7, 876, R12);
|
||||
stfsu( F8, 543, R13);
|
||||
stfsx( F9, R14, R15);
|
||||
stfd( F10, 210, R16);
|
||||
stfdu( F11, 111, R17);
|
||||
stfdx( F12, R18, R19);
|
||||
|
||||
// PPC 1, section 4.6.4 Floating-Point Move Instructions
|
||||
fmr( F13, F14);
|
||||
fmr_( F14, F15);
|
||||
fneg( F16, F17);
|
||||
fneg_( F18, F19);
|
||||
fabs( F20, F21);
|
||||
fabs_( F22, F23);
|
||||
fnabs( F24, F25);
|
||||
fnabs_(F26, F27);
|
||||
|
||||
// PPC 1, section 4.6.5.1 Floating-Point Elementary Arithmetic
|
||||
// Instructions
|
||||
fadd( F28, F29, F30);
|
||||
fadd_( F31, F0, F1);
|
||||
fadds( F2, F3, F4);
|
||||
fadds_(F5, F6, F7);
|
||||
fsub( F8, F9, F10);
|
||||
fsub_( F11, F12, F13);
|
||||
fsubs( F14, F15, F16);
|
||||
fsubs_(F17, F18, F19);
|
||||
fmul( F20, F21, F22);
|
||||
fmul_( F23, F24, F25);
|
||||
fmuls( F26, F27, F28);
|
||||
fmuls_(F29, F30, F31);
|
||||
fdiv( F0, F1, F2);
|
||||
fdiv_( F3, F4, F5);
|
||||
fdivs( F6, F7, F8);
|
||||
fdivs_(F9, F10, F11);
|
||||
|
||||
// PPC 1, section 4.6.6 Floating-Point Rounding and Conversion
|
||||
// Instructions
|
||||
frsp( F12, F13);
|
||||
fctid( F14, F15);
|
||||
fctidz(F16, F17);
|
||||
fctiw( F18, F19);
|
||||
fctiwz(F20, F21);
|
||||
fcfid( F22, F23);
|
||||
|
||||
// PPC 1, section 4.6.7 Floating-Point Compare Instructions
|
||||
fcmpu( CCR7, F24, F25);
|
||||
|
||||
tty->print_cr("\ntest_asm disassembly (0x%lx 0x%lx):", code()->insts_begin(), code()->insts_end());
|
||||
code()->decode();
|
||||
}
|
||||
#endif // !PRODUCT
|
1973
hotspot/src/cpu/ppc/vm/assembler_ppc.hpp
Normal file
1973
hotspot/src/cpu/ppc/vm/assembler_ppc.hpp
Normal file
File diff suppressed because it is too large
Load Diff
813
hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp
Normal file
813
hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp
Normal file
@ -0,0 +1,813 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_PPC_VM_ASSEMBLER_PPC_INLINE_HPP
|
||||
#define CPU_PPC_VM_ASSEMBLER_PPC_INLINE_HPP
|
||||
|
||||
#include "asm/assembler.inline.hpp"
|
||||
#include "asm/codeBuffer.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
|
||||
inline void Assembler::emit_int32(int x) {
|
||||
AbstractAssembler::emit_int32(x);
|
||||
}
|
||||
|
||||
inline void Assembler::emit_data(int x) {
|
||||
emit_int32(x);
|
||||
}
|
||||
|
||||
inline void Assembler::emit_data(int x, relocInfo::relocType rtype) {
|
||||
relocate(rtype);
|
||||
emit_int32(x);
|
||||
}
|
||||
|
||||
inline void Assembler::emit_data(int x, RelocationHolder const& rspec) {
|
||||
relocate(rspec);
|
||||
emit_int32(x);
|
||||
}
|
||||
|
||||
// Emit an address
|
||||
inline address Assembler::emit_addr(const address addr) {
|
||||
address start = pc();
|
||||
emit_address(addr);
|
||||
return start;
|
||||
}
|
||||
|
||||
// Emit a function descriptor with the specified entry point, TOC, and
|
||||
// ENV. If the entry point is NULL, the descriptor will point just
|
||||
// past the descriptor.
|
||||
inline address Assembler::emit_fd(address entry, address toc, address env) {
|
||||
FunctionDescriptor* fd = (FunctionDescriptor*)pc();
|
||||
|
||||
assert(sizeof(FunctionDescriptor) == 3*sizeof(address), "function descriptor size");
|
||||
|
||||
(void)emit_addr();
|
||||
(void)emit_addr();
|
||||
(void)emit_addr();
|
||||
|
||||
fd->set_entry(entry == NULL ? pc() : entry);
|
||||
fd->set_toc(toc);
|
||||
fd->set_env(env);
|
||||
|
||||
return (address)fd;
|
||||
}
|
||||
|
||||
// Issue an illegal instruction. 0 is guaranteed to be an illegal instruction.
|
||||
inline void Assembler::illtrap() { Assembler::emit_int32(0); }
|
||||
inline bool Assembler::is_illtrap(int x) { return x == 0; }
|
||||
|
||||
// PPC 1, section 3.3.8, Fixed-Point Arithmetic Instructions
|
||||
inline void Assembler::addi( Register d, Register a, int si16) { assert(a != R0, "r0 not allowed"); addi_r0ok( d, a, si16); }
|
||||
inline void Assembler::addis( Register d, Register a, int si16) { assert(a != R0, "r0 not allowed"); addis_r0ok(d, a, si16); }
|
||||
inline void Assembler::addi_r0ok(Register d,Register a,int si16) { emit_int32(ADDI_OPCODE | rt(d) | ra(a) | simm(si16, 16)); }
|
||||
inline void Assembler::addis_r0ok(Register d,Register a,int si16) { emit_int32(ADDIS_OPCODE | rt(d) | ra(a) | simm(si16, 16)); }
|
||||
inline void Assembler::addic_( Register d, Register a, int si16) { emit_int32(ADDIC__OPCODE | rt(d) | ra(a) | simm(si16, 16)); }
|
||||
inline void Assembler::subfic( Register d, Register a, int si16) { emit_int32(SUBFIC_OPCODE | rt(d) | ra(a) | simm(si16, 16)); }
|
||||
inline void Assembler::add( Register d, Register a, Register b) { emit_int32(ADD_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(0)); }
|
||||
inline void Assembler::add_( Register d, Register a, Register b) { emit_int32(ADD_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); }
|
||||
inline void Assembler::subf( Register d, Register a, Register b) { emit_int32(SUBF_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(0)); }
|
||||
inline void Assembler::sub( Register d, Register a, Register b) { subf(d, b, a); }
|
||||
inline void Assembler::subf_( Register d, Register a, Register b) { emit_int32(SUBF_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); }
|
||||
inline void Assembler::addc( Register d, Register a, Register b) { emit_int32(ADDC_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(0)); }
|
||||
inline void Assembler::addc_( Register d, Register a, Register b) { emit_int32(ADDC_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); }
|
||||
inline void Assembler::subfc( Register d, Register a, Register b) { emit_int32(SUBFC_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(0)); }
|
||||
inline void Assembler::subfc_( Register d, Register a, Register b) { emit_int32(SUBFC_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); }
|
||||
inline void Assembler::adde( Register d, Register a, Register b) { emit_int32(ADDE_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(0)); }
|
||||
inline void Assembler::adde_( Register d, Register a, Register b) { emit_int32(ADDE_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); }
|
||||
inline void Assembler::subfe( Register d, Register a, Register b) { emit_int32(SUBFE_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(0)); }
|
||||
inline void Assembler::subfe_( Register d, Register a, Register b) { emit_int32(SUBFE_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); }
|
||||
inline void Assembler::neg( Register d, Register a) { emit_int32(NEG_OPCODE | rt(d) | ra(a) | oe(0) | rc(0)); }
|
||||
inline void Assembler::neg_( Register d, Register a) { emit_int32(NEG_OPCODE | rt(d) | ra(a) | oe(0) | rc(1)); }
|
||||
inline void Assembler::mulli( Register d, Register a, int si16) { emit_int32(MULLI_OPCODE | rt(d) | ra(a) | simm(si16, 16)); }
|
||||
inline void Assembler::mulld( Register d, Register a, Register b) { emit_int32(MULLD_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(0)); }
|
||||
inline void Assembler::mulld_( Register d, Register a, Register b) { emit_int32(MULLD_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); }
|
||||
inline void Assembler::mullw( Register d, Register a, Register b) { emit_int32(MULLW_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(0)); }
|
||||
inline void Assembler::mullw_( Register d, Register a, Register b) { emit_int32(MULLW_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); }
|
||||
inline void Assembler::mulhw( Register d, Register a, Register b) { emit_int32(MULHW_OPCODE | rt(d) | ra(a) | rb(b) | rc(0)); }
|
||||
inline void Assembler::mulhw_( Register d, Register a, Register b) { emit_int32(MULHW_OPCODE | rt(d) | ra(a) | rb(b) | rc(1)); }
|
||||
inline void Assembler::mulhd( Register d, Register a, Register b) { emit_int32(MULHD_OPCODE | rt(d) | ra(a) | rb(b) | rc(0)); }
|
||||
inline void Assembler::mulhd_( Register d, Register a, Register b) { emit_int32(MULHD_OPCODE | rt(d) | ra(a) | rb(b) | rc(1)); }
|
||||
inline void Assembler::mulhdu( Register d, Register a, Register b) { emit_int32(MULHDU_OPCODE | rt(d) | ra(a) | rb(b) | rc(0)); }
|
||||
inline void Assembler::mulhdu_(Register d, Register a, Register b) { emit_int32(MULHDU_OPCODE | rt(d) | ra(a) | rb(b) | rc(1)); }
|
||||
inline void Assembler::divd( Register d, Register a, Register b) { emit_int32(DIVD_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(0)); }
|
||||
inline void Assembler::divd_( Register d, Register a, Register b) { emit_int32(DIVD_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); }
|
||||
inline void Assembler::divw( Register d, Register a, Register b) { emit_int32(DIVW_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(0)); }
|
||||
inline void Assembler::divw_( Register d, Register a, Register b) { emit_int32(DIVW_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); }
|
||||
|
||||
// extended mnemonics
|
||||
inline void Assembler::li( Register d, int si16) { Assembler::addi_r0ok( d, R0, si16); }
|
||||
inline void Assembler::lis( Register d, int si16) { Assembler::addis_r0ok(d, R0, si16); }
|
||||
inline void Assembler::addir(Register d, int si16, Register a) { Assembler::addi(d, a, si16); }
|
||||
|
||||
// PPC 1, section 3.3.9, Fixed-Point Compare Instructions
|
||||
inline void Assembler::cmpi( ConditionRegister f, int l, Register a, int si16) { emit_int32( CMPI_OPCODE | bf(f) | l10(l) | ra(a) | simm(si16,16)); }
|
||||
inline void Assembler::cmp( ConditionRegister f, int l, Register a, Register b) { emit_int32( CMP_OPCODE | bf(f) | l10(l) | ra(a) | rb(b)); }
|
||||
inline void Assembler::cmpli( ConditionRegister f, int l, Register a, int ui16) { emit_int32( CMPLI_OPCODE | bf(f) | l10(l) | ra(a) | uimm(ui16,16)); }
|
||||
inline void Assembler::cmpl( ConditionRegister f, int l, Register a, Register b) { emit_int32( CMPL_OPCODE | bf(f) | l10(l) | ra(a) | rb(b)); }
|
||||
|
||||
// extended mnemonics of Compare Instructions
|
||||
inline void Assembler::cmpwi( ConditionRegister crx, Register a, int si16) { Assembler::cmpi( crx, 0, a, si16); }
|
||||
inline void Assembler::cmpdi( ConditionRegister crx, Register a, int si16) { Assembler::cmpi( crx, 1, a, si16); }
|
||||
inline void Assembler::cmpw( ConditionRegister crx, Register a, Register b) { Assembler::cmp( crx, 0, a, b); }
|
||||
inline void Assembler::cmpd( ConditionRegister crx, Register a, Register b) { Assembler::cmp( crx, 1, a, b); }
|
||||
inline void Assembler::cmplwi(ConditionRegister crx, Register a, int ui16) { Assembler::cmpli(crx, 0, a, ui16); }
|
||||
inline void Assembler::cmpldi(ConditionRegister crx, Register a, int ui16) { Assembler::cmpli(crx, 1, a, ui16); }
|
||||
inline void Assembler::cmplw( ConditionRegister crx, Register a, Register b) { Assembler::cmpl( crx, 0, a, b); }
|
||||
inline void Assembler::cmpld( ConditionRegister crx, Register a, Register b) { Assembler::cmpl( crx, 1, a, b); }
|
||||
|
||||
inline void Assembler::isel(Register d, Register a, Register b, int c) { emit_int32(ISEL_OPCODE | rt(d) | ra(a) | rb(b) | bc(c)); }
|
||||
|
||||
// PPC 1, section 3.3.11, Fixed-Point Logical Instructions
|
||||
inline void Assembler::andi_( Register a, Register s, int ui16) { emit_int32(ANDI_OPCODE | rta(a) | rs(s) | uimm(ui16, 16)); }
|
||||
inline void Assembler::andis_( Register a, Register s, int ui16) { emit_int32(ANDIS_OPCODE | rta(a) | rs(s) | uimm(ui16, 16)); }
|
||||
inline void Assembler::ori( Register a, Register s, int ui16) { emit_int32(ORI_OPCODE | rta(a) | rs(s) | uimm(ui16, 16)); }
|
||||
inline void Assembler::oris( Register a, Register s, int ui16) { emit_int32(ORIS_OPCODE | rta(a) | rs(s) | uimm(ui16, 16)); }
|
||||
inline void Assembler::xori( Register a, Register s, int ui16) { emit_int32(XORI_OPCODE | rta(a) | rs(s) | uimm(ui16, 16)); }
|
||||
inline void Assembler::xoris( Register a, Register s, int ui16) { emit_int32(XORIS_OPCODE | rta(a) | rs(s) | uimm(ui16, 16)); }
|
||||
inline void Assembler::andr( Register a, Register s, Register b) { emit_int32(AND_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::and_( Register a, Register s, Register b) { emit_int32(AND_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
|
||||
inline void Assembler::or_unchecked(Register a, Register s, Register b){ emit_int32(OR_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::orr( Register a, Register s, Register b) { if (a==s && s==b) { Assembler::nop(); } else { Assembler::or_unchecked(a,s,b); } }
|
||||
inline void Assembler::or_( Register a, Register s, Register b) { emit_int32(OR_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::xorr( Register a, Register s, Register b) { emit_int32(XOR_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::xor_( Register a, Register s, Register b) { emit_int32(XOR_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::nand( Register a, Register s, Register b) { emit_int32(NAND_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::nand_( Register a, Register s, Register b) { emit_int32(NAND_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::nor( Register a, Register s, Register b) { emit_int32(NOR_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::nor_( Register a, Register s, Register b) { emit_int32(NOR_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::andc( Register a, Register s, Register b) { emit_int32(ANDC_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::andc_( Register a, Register s, Register b) { emit_int32(ANDC_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::orc( Register a, Register s, Register b) { emit_int32(ORC_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::orc_( Register a, Register s, Register b) { emit_int32(ORC_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::extsb( Register a, Register s) { emit_int32(EXTSB_OPCODE | rta(a) | rs(s) | rc(0)); }
|
||||
inline void Assembler::extsh( Register a, Register s) { emit_int32(EXTSH_OPCODE | rta(a) | rs(s) | rc(0)); }
|
||||
inline void Assembler::extsw( Register a, Register s) { emit_int32(EXTSW_OPCODE | rta(a) | rs(s) | rc(0)); }
|
||||
|
||||
// extended mnemonics
|
||||
inline void Assembler::nop() { Assembler::ori(R0, R0, 0); }
|
||||
// NOP for FP and BR units (different versions to allow them to be in one group)
|
||||
inline void Assembler::fpnop0() { Assembler::fmr(F30, F30); }
|
||||
inline void Assembler::fpnop1() { Assembler::fmr(F31, F31); }
|
||||
inline void Assembler::brnop0() { Assembler::mcrf(CCR2, CCR2); }
|
||||
inline void Assembler::brnop1() { Assembler::mcrf(CCR3, CCR3); }
|
||||
inline void Assembler::brnop2() { Assembler::mcrf(CCR4, CCR4); }
|
||||
|
||||
inline void Assembler::mr( Register d, Register s) { Assembler::orr(d, s, s); }
|
||||
inline void Assembler::ori_opt( Register d, int ui16) { if (ui16!=0) Assembler::ori( d, d, ui16); }
|
||||
inline void Assembler::oris_opt(Register d, int ui16) { if (ui16!=0) Assembler::oris(d, d, ui16); }
|
||||
|
||||
inline void Assembler::endgroup() { Assembler::ori(R1, R1, 0); }
|
||||
|
||||
// count instructions
|
||||
inline void Assembler::cntlzw( Register a, Register s) { emit_int32(CNTLZW_OPCODE | rta(a) | rs(s) | rc(0)); }
|
||||
inline void Assembler::cntlzw_( Register a, Register s) { emit_int32(CNTLZW_OPCODE | rta(a) | rs(s) | rc(1)); }
|
||||
inline void Assembler::cntlzd( Register a, Register s) { emit_int32(CNTLZD_OPCODE | rta(a) | rs(s) | rc(0)); }
|
||||
inline void Assembler::cntlzd_( Register a, Register s) { emit_int32(CNTLZD_OPCODE | rta(a) | rs(s) | rc(1)); }
|
||||
|
||||
// PPC 1, section 3.3.12, Fixed-Point Rotate and Shift Instructions
|
||||
inline void Assembler::sld( Register a, Register s, Register b) { emit_int32(SLD_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::sld_( Register a, Register s, Register b) { emit_int32(SLD_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::slw( Register a, Register s, Register b) { emit_int32(SLW_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::slw_( Register a, Register s, Register b) { emit_int32(SLW_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::srd( Register a, Register s, Register b) { emit_int32(SRD_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::srd_( Register a, Register s, Register b) { emit_int32(SRD_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::srw( Register a, Register s, Register b) { emit_int32(SRW_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::srw_( Register a, Register s, Register b) { emit_int32(SRW_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::srad( Register a, Register s, Register b) { emit_int32(SRAD_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::srad_( Register a, Register s, Register b) { emit_int32(SRAD_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::sraw( Register a, Register s, Register b) { emit_int32(SRAW_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::sraw_( Register a, Register s, Register b) { emit_int32(SRAW_OPCODE | rta(a) | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::sradi( Register a, Register s, int sh6) { emit_int32(SRADI_OPCODE | rta(a) | rs(s) | sh162030(sh6) | rc(0)); }
|
||||
inline void Assembler::sradi_( Register a, Register s, int sh6) { emit_int32(SRADI_OPCODE | rta(a) | rs(s) | sh162030(sh6) | rc(1)); }
|
||||
inline void Assembler::srawi( Register a, Register s, int sh5) { emit_int32(SRAWI_OPCODE | rta(a) | rs(s) | sh1620(sh5) | rc(0)); }
|
||||
inline void Assembler::srawi_( Register a, Register s, int sh5) { emit_int32(SRAWI_OPCODE | rta(a) | rs(s) | sh1620(sh5) | rc(1)); }
|
||||
|
||||
// extended mnemonics for Shift Instructions
|
||||
inline void Assembler::sldi( Register a, Register s, int sh6) { Assembler::rldicr(a, s, sh6, 63-sh6); }
|
||||
inline void Assembler::sldi_( Register a, Register s, int sh6) { Assembler::rldicr_(a, s, sh6, 63-sh6); }
|
||||
inline void Assembler::slwi( Register a, Register s, int sh5) { Assembler::rlwinm(a, s, sh5, 0, 31-sh5); }
|
||||
inline void Assembler::slwi_( Register a, Register s, int sh5) { Assembler::rlwinm_(a, s, sh5, 0, 31-sh5); }
|
||||
inline void Assembler::srdi( Register a, Register s, int sh6) { Assembler::rldicl(a, s, 64-sh6, sh6); }
|
||||
inline void Assembler::srdi_( Register a, Register s, int sh6) { Assembler::rldicl_(a, s, 64-sh6, sh6); }
|
||||
inline void Assembler::srwi( Register a, Register s, int sh5) { Assembler::rlwinm(a, s, 32-sh5, sh5, 31); }
|
||||
inline void Assembler::srwi_( Register a, Register s, int sh5) { Assembler::rlwinm_(a, s, 32-sh5, sh5, 31); }
|
||||
|
||||
inline void Assembler::clrrdi( Register a, Register s, int ui6) { Assembler::rldicr(a, s, 0, 63-ui6); }
|
||||
inline void Assembler::clrrdi_( Register a, Register s, int ui6) { Assembler::rldicr_(a, s, 0, 63-ui6); }
|
||||
inline void Assembler::clrldi( Register a, Register s, int ui6) { Assembler::rldicl(a, s, 0, ui6); }
|
||||
inline void Assembler::clrldi_( Register a, Register s, int ui6) { Assembler::rldicl_(a, s, 0, ui6); }
|
||||
inline void Assembler::clrlsldi( Register a, Register s, int clrl6, int shl6) { Assembler::rldic( a, s, shl6, clrl6-shl6); }
|
||||
inline void Assembler::clrlsldi_(Register a, Register s, int clrl6, int shl6) { Assembler::rldic_(a, s, shl6, clrl6-shl6); }
|
||||
inline void Assembler::extrdi( Register a, Register s, int n, int b){ Assembler::rldicl(a, s, b+n, 64-n); }
|
||||
// testbit with condition register.
|
||||
inline void Assembler::testbitdi(ConditionRegister cr, Register a, Register s, int ui6) {
|
||||
if (cr == CCR0) {
|
||||
Assembler::rldicr_(a, s, 63-ui6, 0);
|
||||
} else {
|
||||
Assembler::rldicr(a, s, 63-ui6, 0);
|
||||
Assembler::cmpdi(cr, a, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// rotate instructions
|
||||
inline void Assembler::rotldi( Register a, Register s, int n) { Assembler::rldicl(a, s, n, 0); }
|
||||
inline void Assembler::rotrdi( Register a, Register s, int n) { Assembler::rldicl(a, s, 64-n, 0); }
|
||||
inline void Assembler::rotlwi( Register a, Register s, int n) { Assembler::rlwinm(a, s, n, 0, 31); }
|
||||
inline void Assembler::rotrwi( Register a, Register s, int n) { Assembler::rlwinm(a, s, 32-n, 0, 31); }
|
||||
|
||||
inline void Assembler::rldic( Register a, Register s, int sh6, int mb6) { emit_int32(RLDIC_OPCODE | rta(a) | rs(s) | sh162030(sh6) | mb2126(mb6) | rc(0)); }
|
||||
inline void Assembler::rldic_( Register a, Register s, int sh6, int mb6) { emit_int32(RLDIC_OPCODE | rta(a) | rs(s) | sh162030(sh6) | mb2126(mb6) | rc(1)); }
|
||||
inline void Assembler::rldicr( Register a, Register s, int sh6, int mb6) { emit_int32(RLDICR_OPCODE | rta(a) | rs(s) | sh162030(sh6) | mb2126(mb6) | rc(0)); }
|
||||
inline void Assembler::rldicr_( Register a, Register s, int sh6, int mb6) { emit_int32(RLDICR_OPCODE | rta(a) | rs(s) | sh162030(sh6) | mb2126(mb6) | rc(1)); }
|
||||
inline void Assembler::rldicl( Register a, Register s, int sh6, int me6) { emit_int32(RLDICL_OPCODE | rta(a) | rs(s) | sh162030(sh6) | me2126(me6) | rc(0)); }
|
||||
inline void Assembler::rldicl_( Register a, Register s, int sh6, int me6) { emit_int32(RLDICL_OPCODE | rta(a) | rs(s) | sh162030(sh6) | me2126(me6) | rc(1)); }
|
||||
inline void Assembler::rlwinm( Register a, Register s, int sh5, int mb5, int me5){ emit_int32(RLWINM_OPCODE | rta(a) | rs(s) | sh1620(sh5) | mb2125(mb5) | me2630(me5) | rc(0)); }
|
||||
inline void Assembler::rlwinm_( Register a, Register s, int sh5, int mb5, int me5){ emit_int32(RLWINM_OPCODE | rta(a) | rs(s) | sh1620(sh5) | mb2125(mb5) | me2630(me5) | rc(1)); }
|
||||
inline void Assembler::rldimi( Register a, Register s, int sh6, int mb6) { emit_int32(RLDIMI_OPCODE | rta(a) | rs(s) | sh162030(sh6) | mb2126(mb6) | rc(0)); }
|
||||
inline void Assembler::rlwimi( Register a, Register s, int sh5, int mb5, int me5){ emit_int32(RLWIMI_OPCODE | rta(a) | rs(s) | sh1620(sh5) | mb2125(mb5) | me2630(me5) | rc(0)); }
|
||||
inline void Assembler::rldimi_( Register a, Register s, int sh6, int mb6) { emit_int32(RLDIMI_OPCODE | rta(a) | rs(s) | sh162030(sh6) | mb2126(mb6) | rc(1)); }
|
||||
inline void Assembler::insrdi( Register a, Register s, int n, int b) { Assembler::rldimi(a, s, 64-(b+n), b); }
|
||||
inline void Assembler::insrwi( Register a, Register s, int n, int b) { Assembler::rlwimi(a, s, 32-(b+n), b, b+n-1); }
|
||||
|
||||
// PPC 1, section 3.3.2 Fixed-Point Load Instructions
|
||||
inline void Assembler::lwzx( Register d, Register s1, Register s2) { emit_int32(LWZX_OPCODE | rt(d) | ra0mem(s1) | rb(s2));}
|
||||
inline void Assembler::lwz( Register d, int si16, Register s1) { emit_int32(LWZ_OPCODE | rt(d) | d1(si16) | ra0mem(s1));}
|
||||
inline void Assembler::lwzu( Register d, int si16, Register s1) { assert(d != s1, "according to ibm manual"); emit_int32(LWZU_OPCODE | rt(d) | d1(si16) | rta0mem(s1));}
|
||||
|
||||
inline void Assembler::lwax( Register d, Register s1, Register s2) { emit_int32(LWAX_OPCODE | rt(d) | ra0mem(s1) | rb(s2));}
|
||||
inline void Assembler::lwa( Register d, int si16, Register s1) { emit_int32(LWA_OPCODE | rt(d) | ds(si16) | ra0mem(s1));}
|
||||
|
||||
inline void Assembler::lhzx( Register d, Register s1, Register s2) { emit_int32(LHZX_OPCODE | rt(d) | ra0mem(s1) | rb(s2));}
|
||||
inline void Assembler::lhz( Register d, int si16, Register s1) { emit_int32(LHZ_OPCODE | rt(d) | d1(si16) | ra0mem(s1));}
|
||||
inline void Assembler::lhzu( Register d, int si16, Register s1) { assert(d != s1, "according to ibm manual"); emit_int32(LHZU_OPCODE | rt(d) | d1(si16) | rta0mem(s1));}
|
||||
|
||||
inline void Assembler::lhax( Register d, Register s1, Register s2) { emit_int32(LHAX_OPCODE | rt(d) | ra0mem(s1) | rb(s2));}
|
||||
inline void Assembler::lha( Register d, int si16, Register s1) { emit_int32(LHA_OPCODE | rt(d) | d1(si16) | ra0mem(s1));}
|
||||
inline void Assembler::lhau( Register d, int si16, Register s1) { assert(d != s1, "according to ibm manual"); emit_int32(LHAU_OPCODE | rt(d) | d1(si16) | rta0mem(s1));}
|
||||
|
||||
inline void Assembler::lbzx( Register d, Register s1, Register s2) { emit_int32(LBZX_OPCODE | rt(d) | ra0mem(s1) | rb(s2));}
|
||||
inline void Assembler::lbz( Register d, int si16, Register s1) { emit_int32(LBZ_OPCODE | rt(d) | d1(si16) | ra0mem(s1));}
|
||||
inline void Assembler::lbzu( Register d, int si16, Register s1) { assert(d != s1, "according to ibm manual"); emit_int32(LBZU_OPCODE | rt(d) | d1(si16) | rta0mem(s1));}
|
||||
|
||||
inline void Assembler::ld( Register d, int si16, Register s1) { emit_int32(LD_OPCODE | rt(d) | ds(si16) | ra0mem(s1));}
|
||||
inline void Assembler::ldx( Register d, Register s1, Register s2) { emit_int32(LDX_OPCODE | rt(d) | ra0mem(s1) | rb(s2));}
|
||||
inline void Assembler::ldu( Register d, int si16, Register s1) { assert(d != s1, "according to ibm manual"); emit_int32(LDU_OPCODE | rt(d) | ds(si16) | rta0mem(s1));}
|
||||
|
||||
// PPC 1, section 3.3.3 Fixed-Point Store Instructions
|
||||
inline void Assembler::stwx( Register d, Register s1, Register s2) { emit_int32(STWX_OPCODE | rs(d) | ra0mem(s1) | rb(s2));}
|
||||
inline void Assembler::stw( Register d, int si16, Register s1) { emit_int32(STW_OPCODE | rs(d) | d1(si16) | ra0mem(s1));}
|
||||
inline void Assembler::stwu( Register d, int si16, Register s1) { emit_int32(STWU_OPCODE | rs(d) | d1(si16) | rta0mem(s1));}
|
||||
|
||||
inline void Assembler::sthx( Register d, Register s1, Register s2) { emit_int32(STHX_OPCODE | rs(d) | ra0mem(s1) | rb(s2));}
|
||||
inline void Assembler::sth( Register d, int si16, Register s1) { emit_int32(STH_OPCODE | rs(d) | d1(si16) | ra0mem(s1));}
|
||||
inline void Assembler::sthu( Register d, int si16, Register s1) { emit_int32(STHU_OPCODE | rs(d) | d1(si16) | rta0mem(s1));}
|
||||
|
||||
inline void Assembler::stbx( Register d, Register s1, Register s2) { emit_int32(STBX_OPCODE | rs(d) | ra0mem(s1) | rb(s2));}
|
||||
inline void Assembler::stb( Register d, int si16, Register s1) { emit_int32(STB_OPCODE | rs(d) | d1(si16) | ra0mem(s1));}
|
||||
inline void Assembler::stbu( Register d, int si16, Register s1) { emit_int32(STBU_OPCODE | rs(d) | d1(si16) | rta0mem(s1));}
|
||||
|
||||
inline void Assembler::std( Register d, int si16, Register s1) { emit_int32(STD_OPCODE | rs(d) | ds(si16) | ra0mem(s1));}
|
||||
inline void Assembler::stdx( Register d, Register s1, Register s2) { emit_int32(STDX_OPCODE | rs(d) | ra0mem(s1) | rb(s2));}
|
||||
inline void Assembler::stdu( Register d, int si16, Register s1) { emit_int32(STDU_OPCODE | rs(d) | ds(si16) | rta0mem(s1));}
|
||||
inline void Assembler::stdux(Register s, Register a, Register b) { emit_int32(STDUX_OPCODE| rs(s) | rta0mem(a) | rb(b));}
|
||||
|
||||
// PPC 1, section 3.3.13 Move To/From System Register Instructions
|
||||
inline void Assembler::mtlr( Register s1) { emit_int32(MTLR_OPCODE | rs(s1)); }
|
||||
inline void Assembler::mflr( Register d ) { emit_int32(MFLR_OPCODE | rt(d)); }
|
||||
inline void Assembler::mtctr(Register s1) { emit_int32(MTCTR_OPCODE | rs(s1)); }
|
||||
inline void Assembler::mfctr(Register d ) { emit_int32(MFCTR_OPCODE | rt(d)); }
|
||||
inline void Assembler::mtcrf(int afxm, Register s){ emit_int32(MTCRF_OPCODE | fxm(afxm) | rs(s)); }
|
||||
inline void Assembler::mfcr( Register d ) { emit_int32(MFCR_OPCODE | rt(d)); }
|
||||
inline void Assembler::mcrf( ConditionRegister crd, ConditionRegister cra)
|
||||
{ emit_int32(MCRF_OPCODE | bf(crd) | bfa(cra)); }
|
||||
inline void Assembler::mtcr( Register s) { Assembler::mtcrf(0xff, s); }
|
||||
|
||||
// SAP JVM 2006-02-13 PPC branch instruction.
|
||||
// PPC 1, section 2.4.1 Branch Instructions
|
||||
inline void Assembler::b( address a, relocInfo::relocType rt) { emit_data(BXX_OPCODE| li(disp( intptr_t(a), intptr_t(pc()))) |aa(0)|lk(0), rt); }
|
||||
inline void Assembler::b( Label& L) { b( target(L)); }
|
||||
inline void Assembler::bl(address a, relocInfo::relocType rt) { emit_data(BXX_OPCODE| li(disp( intptr_t(a), intptr_t(pc()))) |aa(0)|lk(1), rt); }
|
||||
inline void Assembler::bl(Label& L) { bl(target(L)); }
|
||||
inline void Assembler::bc( int boint, int biint, address a, relocInfo::relocType rt) { emit_data(BCXX_OPCODE| bo(boint) | bi(biint) | bd(disp( intptr_t(a), intptr_t(pc()))) | aa(0) | lk(0), rt); }
|
||||
inline void Assembler::bc( int boint, int biint, Label& L) { bc(boint, biint, target(L)); }
|
||||
inline void Assembler::bcl(int boint, int biint, address a, relocInfo::relocType rt) { emit_data(BCXX_OPCODE| bo(boint) | bi(biint) | bd(disp( intptr_t(a), intptr_t(pc()))) | aa(0)|lk(1)); }
|
||||
inline void Assembler::bcl(int boint, int biint, Label& L) { bcl(boint, biint, target(L)); }
|
||||
|
||||
inline void Assembler::bclr( int boint, int biint, int bhint, relocInfo::relocType rt) { emit_data(BCLR_OPCODE | bo(boint) | bi(biint) | bh(bhint) | aa(0) | lk(0), rt); }
|
||||
inline void Assembler::bclrl( int boint, int biint, int bhint, relocInfo::relocType rt) { emit_data(BCLR_OPCODE | bo(boint) | bi(biint) | bh(bhint) | aa(0) | lk(1), rt); }
|
||||
inline void Assembler::bcctr( int boint, int biint, int bhint, relocInfo::relocType rt) { emit_data(BCCTR_OPCODE| bo(boint) | bi(biint) | bh(bhint) | aa(0) | lk(0), rt); }
|
||||
inline void Assembler::bcctrl(int boint, int biint, int bhint, relocInfo::relocType rt) { emit_data(BCCTR_OPCODE| bo(boint) | bi(biint) | bh(bhint) | aa(0) | lk(1), rt); }
|
||||
|
||||
// helper function for b
|
||||
inline bool Assembler::is_within_range_of_b(address a, address pc) {
|
||||
// Guard against illegal branch targets, e.g. -1 (see CompiledStaticCall and ad-file).
|
||||
if ((((uint64_t)a) & 0x3) != 0) return false;
|
||||
|
||||
const int range = 1 << (29-6); // li field is from bit 6 to bit 29.
|
||||
int value = disp(intptr_t(a), intptr_t(pc));
|
||||
bool result = -range <= value && value < range-1;
|
||||
#ifdef ASSERT
|
||||
if (result) li(value); // Assert that value is in correct range.
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
// helper functions for bcxx.
|
||||
inline bool Assembler::is_within_range_of_bcxx(address a, address pc) {
|
||||
// Guard against illegal branch targets, e.g. -1 (see CompiledStaticCall and ad-file).
|
||||
if ((((uint64_t)a) & 0x3) != 0) return false;
|
||||
|
||||
const int range = 1 << (29-16); // bd field is from bit 16 to bit 29.
|
||||
int value = disp(intptr_t(a), intptr_t(pc));
|
||||
bool result = -range <= value && value < range-1;
|
||||
#ifdef ASSERT
|
||||
if (result) bd(value); // Assert that value is in correct range.
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
// Get the destination of a bxx branch (b, bl, ba, bla).
|
||||
address Assembler::bxx_destination(address baddr) { return bxx_destination(*(int*)baddr, baddr); }
|
||||
address Assembler::bxx_destination(int instr, address pc) { return (address)bxx_destination_offset(instr, (intptr_t)pc); }
|
||||
intptr_t Assembler::bxx_destination_offset(int instr, intptr_t bxx_pos) {
|
||||
intptr_t displ = inv_li_field(instr);
|
||||
return bxx_pos + displ;
|
||||
}
|
||||
|
||||
// Extended mnemonics for Branch Instructions
|
||||
inline void Assembler::blt(ConditionRegister crx, Label& L) { Assembler::bc(bcondCRbiIs1, bi0(crx, less), L); }
|
||||
inline void Assembler::bgt(ConditionRegister crx, Label& L) { Assembler::bc(bcondCRbiIs1, bi0(crx, greater), L); }
|
||||
inline void Assembler::beq(ConditionRegister crx, Label& L) { Assembler::bc(bcondCRbiIs1, bi0(crx, equal), L); }
|
||||
inline void Assembler::bso(ConditionRegister crx, Label& L) { Assembler::bc(bcondCRbiIs1, bi0(crx, summary_overflow), L); }
|
||||
inline void Assembler::bge(ConditionRegister crx, Label& L) { Assembler::bc(bcondCRbiIs0, bi0(crx, less), L); }
|
||||
inline void Assembler::ble(ConditionRegister crx, Label& L) { Assembler::bc(bcondCRbiIs0, bi0(crx, greater), L); }
|
||||
inline void Assembler::bne(ConditionRegister crx, Label& L) { Assembler::bc(bcondCRbiIs0, bi0(crx, equal), L); }
|
||||
inline void Assembler::bns(ConditionRegister crx, Label& L) { Assembler::bc(bcondCRbiIs0, bi0(crx, summary_overflow), L); }
|
||||
|
||||
// Branch instructions with static prediction hints.
|
||||
inline void Assembler::blt_predict_taken (ConditionRegister crx, Label& L) { bc(bcondCRbiIs1_bhintIsTaken, bi0(crx, less), L); }
|
||||
inline void Assembler::bgt_predict_taken (ConditionRegister crx, Label& L) { bc(bcondCRbiIs1_bhintIsTaken, bi0(crx, greater), L); }
|
||||
inline void Assembler::beq_predict_taken (ConditionRegister crx, Label& L) { bc(bcondCRbiIs1_bhintIsTaken, bi0(crx, equal), L); }
|
||||
inline void Assembler::bso_predict_taken (ConditionRegister crx, Label& L) { bc(bcondCRbiIs1_bhintIsTaken, bi0(crx, summary_overflow), L); }
|
||||
inline void Assembler::bge_predict_taken (ConditionRegister crx, Label& L) { bc(bcondCRbiIs0_bhintIsTaken, bi0(crx, less), L); }
|
||||
inline void Assembler::ble_predict_taken (ConditionRegister crx, Label& L) { bc(bcondCRbiIs0_bhintIsTaken, bi0(crx, greater), L); }
|
||||
inline void Assembler::bne_predict_taken (ConditionRegister crx, Label& L) { bc(bcondCRbiIs0_bhintIsTaken, bi0(crx, equal), L); }
|
||||
inline void Assembler::bns_predict_taken (ConditionRegister crx, Label& L) { bc(bcondCRbiIs0_bhintIsTaken, bi0(crx, summary_overflow), L); }
|
||||
inline void Assembler::blt_predict_not_taken(ConditionRegister crx, Label& L) { bc(bcondCRbiIs1_bhintIsNotTaken, bi0(crx, less), L); }
|
||||
inline void Assembler::bgt_predict_not_taken(ConditionRegister crx, Label& L) { bc(bcondCRbiIs1_bhintIsNotTaken, bi0(crx, greater), L); }
|
||||
inline void Assembler::beq_predict_not_taken(ConditionRegister crx, Label& L) { bc(bcondCRbiIs1_bhintIsNotTaken, bi0(crx, equal), L); }
|
||||
inline void Assembler::bso_predict_not_taken(ConditionRegister crx, Label& L) { bc(bcondCRbiIs1_bhintIsNotTaken, bi0(crx, summary_overflow), L); }
|
||||
inline void Assembler::bge_predict_not_taken(ConditionRegister crx, Label& L) { bc(bcondCRbiIs0_bhintIsNotTaken, bi0(crx, less), L); }
|
||||
inline void Assembler::ble_predict_not_taken(ConditionRegister crx, Label& L) { bc(bcondCRbiIs0_bhintIsNotTaken, bi0(crx, greater), L); }
|
||||
inline void Assembler::bne_predict_not_taken(ConditionRegister crx, Label& L) { bc(bcondCRbiIs0_bhintIsNotTaken, bi0(crx, equal), L); }
|
||||
inline void Assembler::bns_predict_not_taken(ConditionRegister crx, Label& L) { bc(bcondCRbiIs0_bhintIsNotTaken, bi0(crx, summary_overflow), L); }
|
||||
|
||||
// For use in conjunction with testbitdi:
|
||||
inline void Assembler::btrue( ConditionRegister crx, Label& L) { Assembler::bne(crx, L); }
|
||||
inline void Assembler::bfalse(ConditionRegister crx, Label& L) { Assembler::beq(crx, L); }
|
||||
|
||||
inline void Assembler::bltl(ConditionRegister crx, Label& L) { Assembler::bcl(bcondCRbiIs1, bi0(crx, less), L); }
|
||||
inline void Assembler::bgtl(ConditionRegister crx, Label& L) { Assembler::bcl(bcondCRbiIs1, bi0(crx, greater), L); }
|
||||
inline void Assembler::beql(ConditionRegister crx, Label& L) { Assembler::bcl(bcondCRbiIs1, bi0(crx, equal), L); }
|
||||
inline void Assembler::bsol(ConditionRegister crx, Label& L) { Assembler::bcl(bcondCRbiIs1, bi0(crx, summary_overflow), L); }
|
||||
inline void Assembler::bgel(ConditionRegister crx, Label& L) { Assembler::bcl(bcondCRbiIs0, bi0(crx, less), L); }
|
||||
inline void Assembler::blel(ConditionRegister crx, Label& L) { Assembler::bcl(bcondCRbiIs0, bi0(crx, greater), L); }
|
||||
inline void Assembler::bnel(ConditionRegister crx, Label& L) { Assembler::bcl(bcondCRbiIs0, bi0(crx, equal), L); }
|
||||
inline void Assembler::bnsl(ConditionRegister crx, Label& L) { Assembler::bcl(bcondCRbiIs0, bi0(crx, summary_overflow), L); }
|
||||
|
||||
// Extended mnemonics for Branch Instructions via LR.
|
||||
// We use `blr' for returns.
|
||||
inline void Assembler::blr(relocInfo::relocType rt) { Assembler::bclr(bcondAlways, 0, bhintbhBCLRisReturn, rt); }
|
||||
|
||||
// Extended mnemonics for Branch Instructions with CTR.
|
||||
// Bdnz means `decrement CTR and jump to L if CTR is not zero'.
|
||||
inline void Assembler::bdnz(Label& L) { Assembler::bc(16, 0, L); }
|
||||
// Decrement and branch if result is zero.
|
||||
inline void Assembler::bdz(Label& L) { Assembler::bc(18, 0, L); }
|
||||
// We use `bctr[l]' for jumps/calls in function descriptor glue
|
||||
// code, e.g. for calls to runtime functions.
|
||||
inline void Assembler::bctr( relocInfo::relocType rt) { Assembler::bcctr(bcondAlways, 0, bhintbhBCCTRisNotReturnButSame, rt); }
|
||||
inline void Assembler::bctrl(relocInfo::relocType rt) { Assembler::bcctrl(bcondAlways, 0, bhintbhBCCTRisNotReturnButSame, rt); }
|
||||
// Conditional jumps/branches via CTR.
|
||||
inline void Assembler::beqctr( ConditionRegister crx, relocInfo::relocType rt) { Assembler::bcctr( bcondCRbiIs1, bi0(crx, equal), bhintbhBCCTRisNotReturnButSame, rt); }
|
||||
inline void Assembler::beqctrl(ConditionRegister crx, relocInfo::relocType rt) { Assembler::bcctrl(bcondCRbiIs1, bi0(crx, equal), bhintbhBCCTRisNotReturnButSame, rt); }
|
||||
inline void Assembler::bnectr( ConditionRegister crx, relocInfo::relocType rt) { Assembler::bcctr( bcondCRbiIs0, bi0(crx, equal), bhintbhBCCTRisNotReturnButSame, rt); }
|
||||
inline void Assembler::bnectrl(ConditionRegister crx, relocInfo::relocType rt) { Assembler::bcctrl(bcondCRbiIs0, bi0(crx, equal), bhintbhBCCTRisNotReturnButSame, rt); }
|
||||
|
||||
// condition register logic instructions
|
||||
inline void Assembler::crand( int d, int s1, int s2) { emit_int32(CRAND_OPCODE | bt(d) | ba(s1) | bb(s2)); }
|
||||
inline void Assembler::crnand(int d, int s1, int s2) { emit_int32(CRNAND_OPCODE | bt(d) | ba(s1) | bb(s2)); }
|
||||
inline void Assembler::cror( int d, int s1, int s2) { emit_int32(CROR_OPCODE | bt(d) | ba(s1) | bb(s2)); }
|
||||
inline void Assembler::crxor( int d, int s1, int s2) { emit_int32(CRXOR_OPCODE | bt(d) | ba(s1) | bb(s2)); }
|
||||
inline void Assembler::crnor( int d, int s1, int s2) { emit_int32(CRNOR_OPCODE | bt(d) | ba(s1) | bb(s2)); }
|
||||
inline void Assembler::creqv( int d, int s1, int s2) { emit_int32(CREQV_OPCODE | bt(d) | ba(s1) | bb(s2)); }
|
||||
inline void Assembler::crandc(int d, int s1, int s2) { emit_int32(CRANDC_OPCODE | bt(d) | ba(s1) | bb(s2)); }
|
||||
inline void Assembler::crorc( int d, int s1, int s2) { emit_int32(CRORC_OPCODE | bt(d) | ba(s1) | bb(s2)); }
|
||||
|
||||
// Conditional move (>= Power7)
|
||||
inline void Assembler::isel(Register d, ConditionRegister cr, Condition cc, bool inv, Register a, Register b) {
|
||||
if (b == noreg) {
|
||||
b = d; // Can be omitted if old value should be kept in "else" case.
|
||||
}
|
||||
Register first = a;
|
||||
Register second = b;
|
||||
if (inv) {
|
||||
first = b;
|
||||
second = a; // exchange
|
||||
}
|
||||
assert(first != R0, "r0 not allowed");
|
||||
isel(d, first, second, bi0(cr, cc));
|
||||
}
|
||||
inline void Assembler::isel_0(Register d, ConditionRegister cr, Condition cc, Register b) {
|
||||
if (b == noreg) {
|
||||
b = d; // Can be omitted if old value should be kept in "else" case.
|
||||
}
|
||||
isel(d, R0, b, bi0(cr, cc));
|
||||
}
|
||||
|
||||
// PPC 2, section 3.2.1 Instruction Cache Instructions
|
||||
inline void Assembler::icbi( Register s1, Register s2) { emit_int32( ICBI_OPCODE | ra0mem(s1) | rb(s2) ); }
|
||||
// PPC 2, section 3.2.2 Data Cache Instructions
|
||||
//inline void Assembler::dcba( Register s1, Register s2) { emit_int32( DCBA_OPCODE | ra0mem(s1) | rb(s2) ); }
|
||||
inline void Assembler::dcbz( Register s1, Register s2) { emit_int32( DCBZ_OPCODE | ra0mem(s1) | rb(s2) ); }
|
||||
inline void Assembler::dcbst( Register s1, Register s2) { emit_int32( DCBST_OPCODE | ra0mem(s1) | rb(s2) ); }
|
||||
inline void Assembler::dcbf( Register s1, Register s2) { emit_int32( DCBF_OPCODE | ra0mem(s1) | rb(s2) ); }
|
||||
// dcache read hint
|
||||
inline void Assembler::dcbt( Register s1, Register s2) { emit_int32( DCBT_OPCODE | ra0mem(s1) | rb(s2) ); }
|
||||
inline void Assembler::dcbtct( Register s1, Register s2, int ct) { emit_int32( DCBT_OPCODE | ra0mem(s1) | rb(s2) | thct(ct)); }
|
||||
inline void Assembler::dcbtds( Register s1, Register s2, int ds) { emit_int32( DCBT_OPCODE | ra0mem(s1) | rb(s2) | thds(ds)); }
|
||||
// dcache write hint
|
||||
inline void Assembler::dcbtst( Register s1, Register s2) { emit_int32( DCBTST_OPCODE | ra0mem(s1) | rb(s2) ); }
|
||||
inline void Assembler::dcbtstct(Register s1, Register s2, int ct) { emit_int32( DCBTST_OPCODE | ra0mem(s1) | rb(s2) | thct(ct)); }
|
||||
|
||||
// machine barrier instructions:
|
||||
inline void Assembler::sync(int a) { emit_int32( SYNC_OPCODE | l910(a)); }
|
||||
inline void Assembler::sync() { Assembler::sync(0); }
|
||||
inline void Assembler::lwsync() { Assembler::sync(1); }
|
||||
inline void Assembler::ptesync() { Assembler::sync(2); }
|
||||
inline void Assembler::eieio() { emit_int32( EIEIO_OPCODE); }
|
||||
inline void Assembler::isync() { emit_int32( ISYNC_OPCODE); }
|
||||
inline void Assembler::elemental_membar(int e) { assert(0 < e && e < 16, "invalid encoding"); emit_int32( SYNC_OPCODE | e1215(e)); }
|
||||
|
||||
// atomics
|
||||
// Use ra0mem to disallow R0 as base.
|
||||
inline void Assembler::lwarx_unchecked(Register d, Register a, Register b, int eh1) { emit_int32( LWARX_OPCODE | rt(d) | ra0mem(a) | rb(b) | eh(eh1)); }
|
||||
inline void Assembler::ldarx_unchecked(Register d, Register a, Register b, int eh1) { emit_int32( LDARX_OPCODE | rt(d) | ra0mem(a) | rb(b) | eh(eh1)); }
|
||||
inline bool Assembler::lxarx_hint_exclusive_access() { return VM_Version::has_lxarxeh(); }
|
||||
inline void Assembler::lwarx( Register d, Register a, Register b, bool hint_exclusive_access) { lwarx_unchecked(d, a, b, (hint_exclusive_access && lxarx_hint_exclusive_access() && UseExtendedLoadAndReserveInstructionsPPC64) ? 1 : 0); }
|
||||
inline void Assembler::ldarx( Register d, Register a, Register b, bool hint_exclusive_access) { ldarx_unchecked(d, a, b, (hint_exclusive_access && lxarx_hint_exclusive_access() && UseExtendedLoadAndReserveInstructionsPPC64) ? 1 : 0); }
|
||||
inline void Assembler::stwcx_(Register s, Register a, Register b) { emit_int32( STWCX_OPCODE | rs(s) | ra0mem(a) | rb(b) | rc(1)); }
|
||||
inline void Assembler::stdcx_(Register s, Register a, Register b) { emit_int32( STDCX_OPCODE | rs(s) | ra0mem(a) | rb(b) | rc(1)); }
|
||||
|
||||
// Instructions for adjusting thread priority
|
||||
// for simultaneous multithreading (SMT) on POWER5.
|
||||
inline void Assembler::smt_prio_very_low() { Assembler::or_unchecked(R31, R31, R31); }
|
||||
inline void Assembler::smt_prio_low() { Assembler::or_unchecked(R1, R1, R1); }
|
||||
inline void Assembler::smt_prio_medium_low() { Assembler::or_unchecked(R6, R6, R6); }
|
||||
inline void Assembler::smt_prio_medium() { Assembler::or_unchecked(R2, R2, R2); }
|
||||
inline void Assembler::smt_prio_medium_high() { Assembler::or_unchecked(R5, R5, R5); }
|
||||
inline void Assembler::smt_prio_high() { Assembler::or_unchecked(R3, R3, R3); }
|
||||
|
||||
inline void Assembler::twi_0(Register a) { twi_unchecked(0, a, 0);}
|
||||
|
||||
// trap instructions
|
||||
inline void Assembler::tdi_unchecked(int tobits, Register a, int si16){ emit_int32( TDI_OPCODE | to(tobits) | ra(a) | si(si16)); }
|
||||
inline void Assembler::twi_unchecked(int tobits, Register a, int si16){ emit_int32( TWI_OPCODE | to(tobits) | ra(a) | si(si16)); }
|
||||
inline void Assembler::tdi(int tobits, Register a, int si16) { assert(UseSIGTRAP, "precondition"); tdi_unchecked(tobits, a, si16); }
|
||||
inline void Assembler::twi(int tobits, Register a, int si16) { assert(UseSIGTRAP, "precondition"); twi_unchecked(tobits, a, si16); }
|
||||
inline void Assembler::td( int tobits, Register a, Register b) { assert(UseSIGTRAP, "precondition"); emit_int32( TD_OPCODE | to(tobits) | ra(a) | rb(b)); }
|
||||
inline void Assembler::tw( int tobits, Register a, Register b) { assert(UseSIGTRAP, "precondition"); emit_int32( TW_OPCODE | to(tobits) | ra(a) | rb(b)); }
|
||||
|
||||
// FLOATING POINT instructions ppc.
|
||||
// PPC 1, section 4.6.2 Floating-Point Load Instructions
|
||||
// Use ra0mem instead of ra in some instructions below.
|
||||
inline void Assembler::lfs( FloatRegister d, int si16, Register a) { emit_int32( LFS_OPCODE | frt(d) | ra0mem(a) | simm(si16,16)); }
|
||||
inline void Assembler::lfsu(FloatRegister d, int si16, Register a) { emit_int32( LFSU_OPCODE | frt(d) | ra(a) | simm(si16,16)); }
|
||||
inline void Assembler::lfsx(FloatRegister d, Register a, Register b) { emit_int32( LFSX_OPCODE | frt(d) | ra0mem(a) | rb(b)); }
|
||||
inline void Assembler::lfd( FloatRegister d, int si16, Register a) { emit_int32( LFD_OPCODE | frt(d) | ra0mem(a) | simm(si16,16)); }
|
||||
inline void Assembler::lfdu(FloatRegister d, int si16, Register a) { emit_int32( LFDU_OPCODE | frt(d) | ra(a) | simm(si16,16)); }
|
||||
inline void Assembler::lfdx(FloatRegister d, Register a, Register b) { emit_int32( LFDX_OPCODE | frt(d) | ra0mem(a) | rb(b)); }
|
||||
|
||||
// PPC 1, section 4.6.3 Floating-Point Store Instructions
|
||||
// Use ra0mem instead of ra in some instructions below.
|
||||
inline void Assembler::stfs( FloatRegister s, int si16, Register a) { emit_int32( STFS_OPCODE | frs(s) | ra0mem(a) | simm(si16,16)); }
|
||||
inline void Assembler::stfsu(FloatRegister s, int si16, Register a) { emit_int32( STFSU_OPCODE | frs(s) | ra(a) | simm(si16,16)); }
|
||||
inline void Assembler::stfsx(FloatRegister s, Register a, Register b){ emit_int32( STFSX_OPCODE | frs(s) | ra0mem(a) | rb(b)); }
|
||||
inline void Assembler::stfd( FloatRegister s, int si16, Register a) { emit_int32( STFD_OPCODE | frs(s) | ra0mem(a) | simm(si16,16)); }
|
||||
inline void Assembler::stfdu(FloatRegister s, int si16, Register a) { emit_int32( STFDU_OPCODE | frs(s) | ra(a) | simm(si16,16)); }
|
||||
inline void Assembler::stfdx(FloatRegister s, Register a, Register b){ emit_int32( STFDX_OPCODE | frs(s) | ra0mem(a) | rb(b)); }
|
||||
|
||||
// PPC 1, section 4.6.4 Floating-Point Move Instructions
|
||||
inline void Assembler::fmr( FloatRegister d, FloatRegister b) { emit_int32( FMR_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fmr_(FloatRegister d, FloatRegister b) { emit_int32( FMR_OPCODE | frt(d) | frb(b) | rc(1)); }
|
||||
|
||||
// These are special Power6 opcodes, reused for "lfdepx" and "stfdepx"
|
||||
// on Power7. Do not use.
|
||||
//inline void Assembler::mffgpr( FloatRegister d, Register b) { emit_int32( MFFGPR_OPCODE | frt(d) | rb(b) | rc(0)); }
|
||||
//inline void Assembler::mftgpr( Register d, FloatRegister b) { emit_int32( MFTGPR_OPCODE | rt(d) | frb(b) | rc(0)); }
|
||||
// add cmpb and popcntb to detect ppc power version.
|
||||
inline void Assembler::cmpb( Register a, Register s, Register b) { emit_int32( CMPB_OPCODE | rta(a) | rs(s) | rb(b) | rc(0)); }
|
||||
inline void Assembler::popcntb(Register a, Register s) { emit_int32( POPCNTB_OPCODE | rta(a) | rs(s)); };
|
||||
inline void Assembler::popcntw(Register a, Register s) { emit_int32( POPCNTW_OPCODE | rta(a) | rs(s)); };
|
||||
inline void Assembler::popcntd(Register a, Register s) { emit_int32( POPCNTD_OPCODE | rta(a) | rs(s)); };
|
||||
|
||||
inline void Assembler::fneg( FloatRegister d, FloatRegister b) { emit_int32( FNEG_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fneg_( FloatRegister d, FloatRegister b) { emit_int32( FNEG_OPCODE | frt(d) | frb(b) | rc(1)); }
|
||||
inline void Assembler::fabs( FloatRegister d, FloatRegister b) { emit_int32( FABS_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fabs_( FloatRegister d, FloatRegister b) { emit_int32( FABS_OPCODE | frt(d) | frb(b) | rc(1)); }
|
||||
inline void Assembler::fnabs( FloatRegister d, FloatRegister b) { emit_int32( FNABS_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fnabs_(FloatRegister d, FloatRegister b) { emit_int32( FNABS_OPCODE | frt(d) | frb(b) | rc(1)); }
|
||||
|
||||
// PPC 1, section 4.6.5.1 Floating-Point Elementary Arithmetic Instructions
|
||||
inline void Assembler::fadd( FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FADD_OPCODE | frt(d) | fra(a) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fadd_( FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FADD_OPCODE | frt(d) | fra(a) | frb(b) | rc(1)); }
|
||||
inline void Assembler::fadds( FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FADDS_OPCODE | frt(d) | fra(a) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fadds_(FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FADDS_OPCODE | frt(d) | fra(a) | frb(b) | rc(1)); }
|
||||
inline void Assembler::fsub( FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FSUB_OPCODE | frt(d) | fra(a) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fsub_( FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FSUB_OPCODE | frt(d) | fra(a) | frb(b) | rc(1)); }
|
||||
inline void Assembler::fsubs( FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FSUBS_OPCODE | frt(d) | fra(a) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fsubs_(FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FSUBS_OPCODE | frt(d) | fra(a) | frb(b) | rc(1)); }
|
||||
inline void Assembler::fmul( FloatRegister d, FloatRegister a, FloatRegister c) { emit_int32( FMUL_OPCODE | frt(d) | fra(a) | frc(c) | rc(0)); }
|
||||
inline void Assembler::fmul_( FloatRegister d, FloatRegister a, FloatRegister c) { emit_int32( FMUL_OPCODE | frt(d) | fra(a) | frc(c) | rc(1)); }
|
||||
inline void Assembler::fmuls( FloatRegister d, FloatRegister a, FloatRegister c) { emit_int32( FMULS_OPCODE | frt(d) | fra(a) | frc(c) | rc(0)); }
|
||||
inline void Assembler::fmuls_(FloatRegister d, FloatRegister a, FloatRegister c) { emit_int32( FMULS_OPCODE | frt(d) | fra(a) | frc(c) | rc(1)); }
|
||||
inline void Assembler::fdiv( FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FDIV_OPCODE | frt(d) | fra(a) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fdiv_( FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FDIV_OPCODE | frt(d) | fra(a) | frb(b) | rc(1)); }
|
||||
inline void Assembler::fdivs( FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FDIVS_OPCODE | frt(d) | fra(a) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fdivs_(FloatRegister d, FloatRegister a, FloatRegister b) { emit_int32( FDIVS_OPCODE | frt(d) | fra(a) | frb(b) | rc(1)); }
|
||||
|
||||
// PPC 1, section 4.6.6 Floating-Point Rounding and Conversion Instructions
|
||||
inline void Assembler::frsp( FloatRegister d, FloatRegister b) { emit_int32( FRSP_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fctid( FloatRegister d, FloatRegister b) { emit_int32( FCTID_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fctidz(FloatRegister d, FloatRegister b) { emit_int32( FCTIDZ_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fctiw( FloatRegister d, FloatRegister b) { emit_int32( FCTIW_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fctiwz(FloatRegister d, FloatRegister b) { emit_int32( FCTIWZ_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fcfid( FloatRegister d, FloatRegister b) { emit_int32( FCFID_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fcfids(FloatRegister d, FloatRegister b) { emit_int32( FCFIDS_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
|
||||
// PPC 1, section 4.6.7 Floating-Point Compare Instructions
|
||||
inline void Assembler::fcmpu( ConditionRegister crx, FloatRegister a, FloatRegister b) { emit_int32( FCMPU_OPCODE | bf(crx) | fra(a) | frb(b)); }
|
||||
|
||||
// PPC 1, section 5.2.1 Floating-Point Arithmetic Instructions
|
||||
inline void Assembler::fsqrt( FloatRegister d, FloatRegister b) { emit_int32( FSQRT_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
inline void Assembler::fsqrts(FloatRegister d, FloatRegister b) { emit_int32( FSQRTS_OPCODE | frt(d) | frb(b) | rc(0)); }
|
||||
|
||||
// Vector instructions for >= Power6.
|
||||
inline void Assembler::lvebx( VectorRegister d, Register s1, Register s2) { emit_int32( LVEBX_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
inline void Assembler::lvehx( VectorRegister d, Register s1, Register s2) { emit_int32( LVEHX_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
inline void Assembler::lvewx( VectorRegister d, Register s1, Register s2) { emit_int32( LVEWX_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
inline void Assembler::lvx( VectorRegister d, Register s1, Register s2) { emit_int32( LVX_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
inline void Assembler::lvxl( VectorRegister d, Register s1, Register s2) { emit_int32( LVXL_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
inline void Assembler::stvebx(VectorRegister d, Register s1, Register s2) { emit_int32( STVEBX_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
inline void Assembler::stvehx(VectorRegister d, Register s1, Register s2) { emit_int32( STVEHX_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
inline void Assembler::stvewx(VectorRegister d, Register s1, Register s2) { emit_int32( STVEWX_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
inline void Assembler::stvx( VectorRegister d, Register s1, Register s2) { emit_int32( STVX_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
inline void Assembler::stvxl( VectorRegister d, Register s1, Register s2) { emit_int32( STVXL_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
inline void Assembler::lvsl( VectorRegister d, Register s1, Register s2) { emit_int32( LVSL_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
inline void Assembler::lvsr( VectorRegister d, Register s1, Register s2) { emit_int32( LVSR_OPCODE | vrt(d) | ra0mem(s1) | rb(s2)); }
|
||||
|
||||
inline void Assembler::vpkpx( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKPX_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vpkshss( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKSHSS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vpkswss( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKSWSS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vpkshus( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKSHUS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vpkswus( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKSWUS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vpkuhum( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKUHUM_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vpkuwum( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKUWUM_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vpkuhus( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKUHUS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vpkuwus( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKUWUS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vupkhpx( VectorRegister d, VectorRegister b) { emit_int32( VUPKHPX_OPCODE | vrt(d) | vrb(b)); }
|
||||
inline void Assembler::vupkhsb( VectorRegister d, VectorRegister b) { emit_int32( VUPKHSB_OPCODE | vrt(d) | vrb(b)); }
|
||||
inline void Assembler::vupkhsh( VectorRegister d, VectorRegister b) { emit_int32( VUPKHSH_OPCODE | vrt(d) | vrb(b)); }
|
||||
inline void Assembler::vupklpx( VectorRegister d, VectorRegister b) { emit_int32( VUPKLPX_OPCODE | vrt(d) | vrb(b)); }
|
||||
inline void Assembler::vupklsb( VectorRegister d, VectorRegister b) { emit_int32( VUPKLSB_OPCODE | vrt(d) | vrb(b)); }
|
||||
inline void Assembler::vupklsh( VectorRegister d, VectorRegister b) { emit_int32( VUPKLSH_OPCODE | vrt(d) | vrb(b)); }
|
||||
inline void Assembler::vmrghb( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMRGHB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmrghw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMRGHW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmrghh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMRGHH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmrglb( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMRGLB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmrglw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMRGLW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmrglh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMRGLH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsplt( VectorRegister d, int ui4, VectorRegister b) { emit_int32( VSPLT_OPCODE | vrt(d) | vsplt_uim(uimm(ui4,4)) | vrb(b)); }
|
||||
inline void Assembler::vsplth( VectorRegister d, int ui3, VectorRegister b) { emit_int32( VSPLTH_OPCODE | vrt(d) | vsplt_uim(uimm(ui3,3)) | vrb(b)); }
|
||||
inline void Assembler::vspltw( VectorRegister d, int ui2, VectorRegister b) { emit_int32( VSPLTW_OPCODE | vrt(d) | vsplt_uim(uimm(ui2,2)) | vrb(b)); }
|
||||
inline void Assembler::vspltisb(VectorRegister d, int si5) { emit_int32( VSPLTISB_OPCODE| vrt(d) | vsplti_sim(simm(si5,5))); }
|
||||
inline void Assembler::vspltish(VectorRegister d, int si5) { emit_int32( VSPLTISH_OPCODE| vrt(d) | vsplti_sim(simm(si5,5))); }
|
||||
inline void Assembler::vspltisw(VectorRegister d, int si5) { emit_int32( VSPLTISW_OPCODE| vrt(d) | vsplti_sim(simm(si5,5))); }
|
||||
inline void Assembler::vperm( VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c){ emit_int32( VPERM_OPCODE | vrt(d) | vra(a) | vrb(b) | vrc(c)); }
|
||||
inline void Assembler::vsel( VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c){ emit_int32( VSEL_OPCODE | vrt(d) | vra(a) | vrb(b) | vrc(c)); }
|
||||
inline void Assembler::vsl( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSL_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsldoi( VectorRegister d, VectorRegister a, VectorRegister b, int si4) { emit_int32( VSLDOI_OPCODE| vrt(d) | vra(a) | vrb(b) | vsldoi_shb(simm(si4,4))); }
|
||||
inline void Assembler::vslo( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSLO_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsr( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSR_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsro( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSRO_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vaddcuw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VADDCUW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vaddshs( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VADDSHS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vaddsbs( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VADDSBS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vaddsws( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VADDSWS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vaddubm( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VADDUBM_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vadduwm( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VADDUWM_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vadduhm( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VADDUHM_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vaddubs( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VADDUBS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vadduws( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VADDUWS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vadduhs( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VADDUHS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsubcuw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUBCUW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsubshs( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUBSHS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsubsbs( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUBSBS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsubsws( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUBSWS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsububm( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUBUBM_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsubuwm( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUBUWM_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsubuhm( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUBUHM_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsububs( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUBUBS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsubuws( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUBUWS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsubuhs( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUBUHS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmulesb( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMULESB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmuleub( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMULEUB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmulesh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMULESH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmuleuh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMULEUH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmulosb( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMULOSB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmuloub( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMULOUB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmulosh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMULOSH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmulouh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMULOUH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmhaddshs(VectorRegister d,VectorRegister a, VectorRegister b, VectorRegister c) { emit_int32( VMHADDSHS_OPCODE | vrt(d) | vra(a) | vrb(b)| vrc(c)); }
|
||||
inline void Assembler::vmhraddshs(VectorRegister d,VectorRegister a,VectorRegister b, VectorRegister c) { emit_int32( VMHRADDSHS_OPCODE| vrt(d) | vra(a) | vrb(b)| vrc(c)); }
|
||||
inline void Assembler::vmladduhm(VectorRegister d,VectorRegister a, VectorRegister b, VectorRegister c) { emit_int32( VMLADDUHM_OPCODE | vrt(d) | vra(a) | vrb(b)| vrc(c)); }
|
||||
inline void Assembler::vmsubuhm(VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c) { emit_int32( VMSUBUHM_OPCODE | vrt(d) | vra(a) | vrb(b)| vrc(c)); }
|
||||
inline void Assembler::vmsummbm(VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c) { emit_int32( VMSUMMBM_OPCODE | vrt(d) | vra(a) | vrb(b)| vrc(c)); }
|
||||
inline void Assembler::vmsumshm(VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c) { emit_int32( VMSUMSHM_OPCODE | vrt(d) | vra(a) | vrb(b)| vrc(c)); }
|
||||
inline void Assembler::vmsumshs(VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c) { emit_int32( VMSUMSHS_OPCODE | vrt(d) | vra(a) | vrb(b)| vrc(c)); }
|
||||
inline void Assembler::vmsumuhm(VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c) { emit_int32( VMSUMUHM_OPCODE | vrt(d) | vra(a) | vrb(b)| vrc(c)); }
|
||||
inline void Assembler::vmsumuhs(VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c) { emit_int32( VMSUMUHS_OPCODE | vrt(d) | vra(a) | vrb(b)| vrc(c)); }
|
||||
inline void Assembler::vsumsws( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUMSWS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsum2sws(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUM2SWS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsum4sbs(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUM4SBS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsum4ubs(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUM4UBS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsum4shs(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSUM4SHS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vavgsb( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VAVGSB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vavgsw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VAVGSW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vavgsh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VAVGSH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vavgub( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VAVGUB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vavguw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VAVGUW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vavguh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VAVGUH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmaxsb( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMAXSB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmaxsw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMAXSW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmaxsh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMAXSH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmaxub( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMAXUB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmaxuw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMAXUW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vmaxuh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMAXUH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vminsb( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMINSB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vminsw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMINSW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vminsh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMINSH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vminub( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMINUB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vminuw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMINUW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vminuh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VMINUH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vcmpequb(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VCMPEQUB_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(0)); }
|
||||
inline void Assembler::vcmpequh(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VCMPEQUH_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(0)); }
|
||||
inline void Assembler::vcmpequw(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VCMPEQUW_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(0)); }
|
||||
inline void Assembler::vcmpgtsh(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VCMPGTSH_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(0)); }
|
||||
inline void Assembler::vcmpgtsb(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VCMPGTSB_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(0)); }
|
||||
inline void Assembler::vcmpgtsw(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VCMPGTSW_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(0)); }
|
||||
inline void Assembler::vcmpgtub(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VCMPGTUB_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(0)); }
|
||||
inline void Assembler::vcmpgtuh(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VCMPGTUH_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(0)); }
|
||||
inline void Assembler::vcmpgtuw(VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VCMPGTUW_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(0)); }
|
||||
inline void Assembler::vcmpequb_(VectorRegister d,VectorRegister a, VectorRegister b) { emit_int32( VCMPEQUB_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(1)); }
|
||||
inline void Assembler::vcmpequh_(VectorRegister d,VectorRegister a, VectorRegister b) { emit_int32( VCMPEQUH_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(1)); }
|
||||
inline void Assembler::vcmpequw_(VectorRegister d,VectorRegister a, VectorRegister b) { emit_int32( VCMPEQUW_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(1)); }
|
||||
inline void Assembler::vcmpgtsh_(VectorRegister d,VectorRegister a, VectorRegister b) { emit_int32( VCMPGTSH_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(1)); }
|
||||
inline void Assembler::vcmpgtsb_(VectorRegister d,VectorRegister a, VectorRegister b) { emit_int32( VCMPGTSB_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(1)); }
|
||||
inline void Assembler::vcmpgtsw_(VectorRegister d,VectorRegister a, VectorRegister b) { emit_int32( VCMPGTSW_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(1)); }
|
||||
inline void Assembler::vcmpgtub_(VectorRegister d,VectorRegister a, VectorRegister b) { emit_int32( VCMPGTUB_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(1)); }
|
||||
inline void Assembler::vcmpgtuh_(VectorRegister d,VectorRegister a, VectorRegister b) { emit_int32( VCMPGTUH_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(1)); }
|
||||
inline void Assembler::vcmpgtuw_(VectorRegister d,VectorRegister a, VectorRegister b) { emit_int32( VCMPGTUW_OPCODE | vrt(d) | vra(a) | vrb(b) | vcmp_rc(1)); }
|
||||
inline void Assembler::vand( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VAND_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vandc( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VANDC_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vnor( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VNOR_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vor( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VOR_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vxor( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VXOR_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vrlb( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VRLB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vrlw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VRLW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vrlh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VRLH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vslb( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSLB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vskw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSKW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vslh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSLH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsrb( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSRB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsrw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSRW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsrh( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSRH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsrab( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSRAB_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsraw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSRAW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::vsrah( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VSRAH_OPCODE | vrt(d) | vra(a) | vrb(b)); }
|
||||
inline void Assembler::mtvscr( VectorRegister b) { emit_int32( MTVSCR_OPCODE | vrb(b)); }
|
||||
inline void Assembler::mfvscr( VectorRegister d) { emit_int32( MFVSCR_OPCODE | vrt(d)); }
|
||||
|
||||
// ra0 version
|
||||
inline void Assembler::lwzx( Register d, Register s2) { emit_int32( LWZX_OPCODE | rt(d) | rb(s2));}
|
||||
inline void Assembler::lwz( Register d, int si16 ) { emit_int32( LWZ_OPCODE | rt(d) | d1(si16));}
|
||||
inline void Assembler::lwax( Register d, Register s2) { emit_int32( LWAX_OPCODE | rt(d) | rb(s2));}
|
||||
inline void Assembler::lwa( Register d, int si16 ) { emit_int32( LWA_OPCODE | rt(d) | ds(si16));}
|
||||
inline void Assembler::lhzx( Register d, Register s2) { emit_int32( LHZX_OPCODE | rt(d) | rb(s2));}
|
||||
inline void Assembler::lhz( Register d, int si16 ) { emit_int32( LHZ_OPCODE | rt(d) | d1(si16));}
|
||||
inline void Assembler::lhax( Register d, Register s2) { emit_int32( LHAX_OPCODE | rt(d) | rb(s2));}
|
||||
inline void Assembler::lha( Register d, int si16 ) { emit_int32( LHA_OPCODE | rt(d) | d1(si16));}
|
||||
inline void Assembler::lbzx( Register d, Register s2) { emit_int32( LBZX_OPCODE | rt(d) | rb(s2));}
|
||||
inline void Assembler::lbz( Register d, int si16 ) { emit_int32( LBZ_OPCODE | rt(d) | d1(si16));}
|
||||
inline void Assembler::ld( Register d, int si16 ) { emit_int32( LD_OPCODE | rt(d) | ds(si16));}
|
||||
inline void Assembler::ldx( Register d, Register s2) { emit_int32( LDX_OPCODE | rt(d) | rb(s2));}
|
||||
inline void Assembler::stwx( Register d, Register s2) { emit_int32( STWX_OPCODE | rs(d) | rb(s2));}
|
||||
inline void Assembler::stw( Register d, int si16 ) { emit_int32( STW_OPCODE | rs(d) | d1(si16));}
|
||||
inline void Assembler::sthx( Register d, Register s2) { emit_int32( STHX_OPCODE | rs(d) | rb(s2));}
|
||||
inline void Assembler::sth( Register d, int si16 ) { emit_int32( STH_OPCODE | rs(d) | d1(si16));}
|
||||
inline void Assembler::stbx( Register d, Register s2) { emit_int32( STBX_OPCODE | rs(d) | rb(s2));}
|
||||
inline void Assembler::stb( Register d, int si16 ) { emit_int32( STB_OPCODE | rs(d) | d1(si16));}
|
||||
inline void Assembler::std( Register d, int si16 ) { emit_int32( STD_OPCODE | rs(d) | ds(si16));}
|
||||
inline void Assembler::stdx( Register d, Register s2) { emit_int32( STDX_OPCODE | rs(d) | rb(s2));}
|
||||
|
||||
// ra0 version
|
||||
inline void Assembler::icbi( Register s2) { emit_int32( ICBI_OPCODE | rb(s2) ); }
|
||||
//inline void Assembler::dcba( Register s2) { emit_int32( DCBA_OPCODE | rb(s2) ); }
|
||||
inline void Assembler::dcbz( Register s2) { emit_int32( DCBZ_OPCODE | rb(s2) ); }
|
||||
inline void Assembler::dcbst( Register s2) { emit_int32( DCBST_OPCODE | rb(s2) ); }
|
||||
inline void Assembler::dcbf( Register s2) { emit_int32( DCBF_OPCODE | rb(s2) ); }
|
||||
inline void Assembler::dcbt( Register s2) { emit_int32( DCBT_OPCODE | rb(s2) ); }
|
||||
inline void Assembler::dcbtct( Register s2, int ct) { emit_int32( DCBT_OPCODE | rb(s2) | thct(ct)); }
|
||||
inline void Assembler::dcbtds( Register s2, int ds) { emit_int32( DCBT_OPCODE | rb(s2) | thds(ds)); }
|
||||
inline void Assembler::dcbtst( Register s2) { emit_int32( DCBTST_OPCODE | rb(s2) ); }
|
||||
inline void Assembler::dcbtstct(Register s2, int ct) { emit_int32( DCBTST_OPCODE | rb(s2) | thct(ct)); }
|
||||
|
||||
// ra0 version
|
||||
inline void Assembler::lwarx_unchecked(Register d, Register b, int eh1) { emit_int32( LWARX_OPCODE | rt(d) | rb(b) | eh(eh1)); }
|
||||
inline void Assembler::ldarx_unchecked(Register d, Register b, int eh1) { emit_int32( LDARX_OPCODE | rt(d) | rb(b) | eh(eh1)); }
|
||||
inline void Assembler::lwarx( Register d, Register b, bool hint_exclusive_access){ lwarx_unchecked(d, b, (hint_exclusive_access && lxarx_hint_exclusive_access() && UseExtendedLoadAndReserveInstructionsPPC64) ? 1 : 0); }
|
||||
inline void Assembler::ldarx( Register d, Register b, bool hint_exclusive_access){ ldarx_unchecked(d, b, (hint_exclusive_access && lxarx_hint_exclusive_access() && UseExtendedLoadAndReserveInstructionsPPC64) ? 1 : 0); }
|
||||
inline void Assembler::stwcx_(Register s, Register b) { emit_int32( STWCX_OPCODE | rs(s) | rb(b) | rc(1)); }
|
||||
inline void Assembler::stdcx_(Register s, Register b) { emit_int32( STDCX_OPCODE | rs(s) | rb(b) | rc(1)); }
|
||||
|
||||
// ra0 version
|
||||
inline void Assembler::lfs( FloatRegister d, int si16) { emit_int32( LFS_OPCODE | frt(d) | simm(si16,16)); }
|
||||
inline void Assembler::lfsx(FloatRegister d, Register b) { emit_int32( LFSX_OPCODE | frt(d) | rb(b)); }
|
||||
inline void Assembler::lfd( FloatRegister d, int si16) { emit_int32( LFD_OPCODE | frt(d) | simm(si16,16)); }
|
||||
inline void Assembler::lfdx(FloatRegister d, Register b) { emit_int32( LFDX_OPCODE | frt(d) | rb(b)); }
|
||||
|
||||
// ra0 version
|
||||
inline void Assembler::stfs( FloatRegister s, int si16) { emit_int32( STFS_OPCODE | frs(s) | simm(si16, 16)); }
|
||||
inline void Assembler::stfsx(FloatRegister s, Register b) { emit_int32( STFSX_OPCODE | frs(s) | rb(b)); }
|
||||
inline void Assembler::stfd( FloatRegister s, int si16) { emit_int32( STFD_OPCODE | frs(s) | simm(si16, 16)); }
|
||||
inline void Assembler::stfdx(FloatRegister s, Register b) { emit_int32( STFDX_OPCODE | frs(s) | rb(b)); }
|
||||
|
||||
// ra0 version
|
||||
inline void Assembler::lvebx( VectorRegister d, Register s2) { emit_int32( LVEBX_OPCODE | vrt(d) | rb(s2)); }
|
||||
inline void Assembler::lvehx( VectorRegister d, Register s2) { emit_int32( LVEHX_OPCODE | vrt(d) | rb(s2)); }
|
||||
inline void Assembler::lvewx( VectorRegister d, Register s2) { emit_int32( LVEWX_OPCODE | vrt(d) | rb(s2)); }
|
||||
inline void Assembler::lvx( VectorRegister d, Register s2) { emit_int32( LVX_OPCODE | vrt(d) | rb(s2)); }
|
||||
inline void Assembler::lvxl( VectorRegister d, Register s2) { emit_int32( LVXL_OPCODE | vrt(d) | rb(s2)); }
|
||||
inline void Assembler::stvebx(VectorRegister d, Register s2) { emit_int32( STVEBX_OPCODE | vrt(d) | rb(s2)); }
|
||||
inline void Assembler::stvehx(VectorRegister d, Register s2) { emit_int32( STVEHX_OPCODE | vrt(d) | rb(s2)); }
|
||||
inline void Assembler::stvewx(VectorRegister d, Register s2) { emit_int32( STVEWX_OPCODE | vrt(d) | rb(s2)); }
|
||||
inline void Assembler::stvx( VectorRegister d, Register s2) { emit_int32( STVX_OPCODE | vrt(d) | rb(s2)); }
|
||||
inline void Assembler::stvxl( VectorRegister d, Register s2) { emit_int32( STVXL_OPCODE | vrt(d) | rb(s2)); }
|
||||
inline void Assembler::lvsl( VectorRegister d, Register s2) { emit_int32( LVSL_OPCODE | vrt(d) | rb(s2)); }
|
||||
inline void Assembler::lvsr( VectorRegister d, Register s2) { emit_int32( LVSR_OPCODE | vrt(d) | rb(s2)); }
|
||||
|
||||
inline void Assembler::load_const(Register d, void* x, Register tmp) {
|
||||
load_const(d, (long)x, tmp);
|
||||
}
|
||||
|
||||
// Load a 64 bit constant encoded by a `Label'. This works for bound
|
||||
// labels as well as unbound ones. For unbound labels, the code will
|
||||
// be patched as soon as the label gets bound.
|
||||
inline void Assembler::load_const(Register d, Label& L, Register tmp) {
|
||||
load_const(d, target(L), tmp);
|
||||
}
|
||||
|
||||
// Load a 64 bit constant encoded by an AddressLiteral. patchable.
|
||||
inline void Assembler::load_const(Register d, AddressLiteral& a, Register tmp) {
|
||||
assert(d != R0, "R0 not allowed");
|
||||
// First relocate (we don't change the offset in the RelocationHolder,
|
||||
// just pass a.rspec()), then delegate to load_const(Register, long).
|
||||
relocate(a.rspec());
|
||||
load_const(d, (long)a.value(), tmp);
|
||||
}
|
||||
|
||||
|
||||
#endif // CPU_PPC_VM_ASSEMBLER_PPC_INLINE_HPP
|
106
hotspot/src/cpu/ppc/vm/bytecodeInterpreter_ppc.hpp
Normal file
106
hotspot/src/cpu/ppc/vm/bytecodeInterpreter_ppc.hpp
Normal file
@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_PPC_VM_BYTECODEINTERPRETER_PPC_HPP
|
||||
#define CPU_PPC_VM_BYTECODEINTERPRETER_PPC_HPP
|
||||
|
||||
// Platform specific for C++ based Interpreter
|
||||
#define LOTS_OF_REGS /* Lets interpreter use plenty of registers */
|
||||
|
||||
private:
|
||||
|
||||
// Save the bottom of the stack after frame manager setup. For ease of restoration after return
|
||||
// from recursive interpreter call.
|
||||
intptr_t* _frame_bottom; // Saved bottom of frame manager frame.
|
||||
address _last_Java_pc; // Pc to return to in frame manager.
|
||||
intptr_t* _last_Java_fp; // frame pointer
|
||||
intptr_t* _last_Java_sp; // stack pointer
|
||||
interpreterState _self_link; // Previous interpreter state // sometimes points to self???
|
||||
double _native_fresult; // Save result of native calls that might return floats.
|
||||
intptr_t _native_lresult; // Save result of native calls that might return handle/longs.
|
||||
|
||||
public:
|
||||
address last_Java_pc(void) { return _last_Java_pc; }
|
||||
intptr_t* last_Java_fp(void) { return _last_Java_fp; }
|
||||
|
||||
static ByteSize native_lresult_offset() {
|
||||
return byte_offset_of(BytecodeInterpreter, _native_lresult);
|
||||
}
|
||||
|
||||
static ByteSize native_fresult_offset() {
|
||||
return byte_offset_of(BytecodeInterpreter, _native_fresult);
|
||||
}
|
||||
|
||||
static void pd_layout_interpreterState(interpreterState istate, address last_Java_pc, intptr_t* last_Java_fp);
|
||||
|
||||
#define SET_LAST_JAVA_FRAME() THREAD->frame_anchor()->set(istate->_last_Java_sp, istate->_last_Java_pc);
|
||||
#define RESET_LAST_JAVA_FRAME() THREAD->frame_anchor()->clear();
|
||||
|
||||
|
||||
// Macros for accessing the stack.
|
||||
#undef STACK_INT
|
||||
#undef STACK_FLOAT
|
||||
#undef STACK_ADDR
|
||||
#undef STACK_OBJECT
|
||||
#undef STACK_DOUBLE
|
||||
#undef STACK_LONG
|
||||
|
||||
// JavaStack Implementation
|
||||
#define STACK_SLOT(offset) ((address) &topOfStack[-(offset)])
|
||||
#define STACK_INT(offset) (*((jint*) &topOfStack[-(offset)]))
|
||||
#define STACK_FLOAT(offset) (*((jfloat *) &topOfStack[-(offset)]))
|
||||
#define STACK_OBJECT(offset) (*((oop *) &topOfStack [-(offset)]))
|
||||
#define STACK_DOUBLE(offset) (((VMJavaVal64*) &topOfStack[-(offset)])->d)
|
||||
#define STACK_LONG(offset) (((VMJavaVal64 *) &topOfStack[-(offset)])->l)
|
||||
|
||||
#define SET_STACK_SLOT(value, offset) (*(intptr_t*)&topOfStack[-(offset)] = *(intptr_t*)(value))
|
||||
#define SET_STACK_ADDR(value, offset) (*((address *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_INT(value, offset) (*((jint *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_FLOAT(value, offset) (*((jfloat *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_OBJECT(value, offset) (*((oop *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_DOUBLE(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = (value))
|
||||
#define SET_STACK_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = \
|
||||
((VMJavaVal64*)(addr))->d)
|
||||
#define SET_STACK_LONG(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->l = (value))
|
||||
#define SET_STACK_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->l = \
|
||||
((VMJavaVal64*)(addr))->l)
|
||||
// JavaLocals implementation
|
||||
|
||||
#define LOCALS_SLOT(offset) ((intptr_t*)&locals[-(offset)])
|
||||
#define LOCALS_ADDR(offset) ((address)locals[-(offset)])
|
||||
#define LOCALS_INT(offset) (*(jint*)&(locals[-(offset)]))
|
||||
#define LOCALS_OBJECT(offset) (cast_to_oop(locals[-(offset)]))
|
||||
#define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)]))
|
||||
#define LOCALS_DOUBLE_AT(offset) (((address)&locals[-((offset) + 1)]))
|
||||
|
||||
#define SET_LOCALS_SLOT(value, offset) (*(intptr_t*)&locals[-(offset)] = *(intptr_t *)(value))
|
||||
#define SET_LOCALS_INT(value, offset) (*((jint *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_DOUBLE(value, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = (value))
|
||||
#define SET_LOCALS_LONG(value, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = (value))
|
||||
#define SET_LOCALS_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = \
|
||||
((VMJavaVal64*)(addr))->d)
|
||||
|
||||
|
||||
#endif // CPU_PPC_VM_BYTECODEINTERPRETER_PPC_PP
|
290
hotspot/src/cpu/ppc/vm/bytecodeInterpreter_ppc.inline.hpp
Normal file
290
hotspot/src/cpu/ppc/vm/bytecodeInterpreter_ppc.inline.hpp
Normal file
@ -0,0 +1,290 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_PPC_VM_BYTECODEINTERPRETER_PPC_INLINE_HPP
|
||||
#define CPU_PPC_VM_BYTECODEINTERPRETER_PPC_INLINE_HPP
|
||||
|
||||
#ifdef CC_INTERP
|
||||
|
||||
// Inline interpreter functions for ppc.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMfloatAdd(jfloat op1, jfloat op2) { return op1 + op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatSub(jfloat op1, jfloat op2) { return op1 - op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatMul(jfloat op1, jfloat op2) { return op1 * op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatDiv(jfloat op1, jfloat op2) { return op1 / op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatRem(jfloat op1, jfloat op2) { return (jfloat)fmod((double)op1, (double)op2); }
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMfloatNeg(jfloat op) { return -op; }
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMfloatCompare(jfloat op1, jfloat op2, int32_t direction) {
|
||||
return ( op1 < op2 ? -1 :
|
||||
op1 > op2 ? 1 :
|
||||
op1 == op2 ? 0 :
|
||||
(direction == -1 || direction == 1) ? direction : 0);
|
||||
|
||||
}
|
||||
|
||||
inline void BytecodeInterpreter::VMmemCopy64(uint32_t to[2], const uint32_t from[2]) {
|
||||
to[0] = from[0]; to[1] = from[1];
|
||||
}
|
||||
|
||||
// The long operations depend on compiler support for "long long" on ppc.
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongAdd(jlong op1, jlong op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongAnd(jlong op1, jlong op2) {
|
||||
return op1 & op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongDiv(jlong op1, jlong op2) {
|
||||
if (op1 == min_jlong && op2 == -1) return op1;
|
||||
return op1 / op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongMul(jlong op1, jlong op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongOr(jlong op1, jlong op2) {
|
||||
return op1 | op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongSub(jlong op1, jlong op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongXor(jlong op1, jlong op2) {
|
||||
return op1 ^ op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongRem(jlong op1, jlong op2) {
|
||||
if (op1 == min_jlong && op2 == -1) return 0;
|
||||
return op1 % op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongUshr(jlong op1, jint op2) {
|
||||
return ((uint64_t) op1) >> (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongShr(jlong op1, jint op2) {
|
||||
return op1 >> (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongShl(jlong op1, jint op2) {
|
||||
return op1 << (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongNeg(jlong op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongNot(jlong op) {
|
||||
return ~op;
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLtz(jlong op) {
|
||||
return (op <= 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGez(jlong op) {
|
||||
return (op >= 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongEqz(jlong op) {
|
||||
return (op == 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongEq(jlong op1, jlong op2) {
|
||||
return (op1 == op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongNe(jlong op1, jlong op2) {
|
||||
return (op1 != op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGe(jlong op1, jlong op2) {
|
||||
return (op1 >= op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLe(jlong op1, jlong op2) {
|
||||
return (op1 <= op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLt(jlong op1, jlong op2) {
|
||||
return (op1 < op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGt(jlong op1, jlong op2) {
|
||||
return (op1 > op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongCompare(jlong op1, jlong op2) {
|
||||
return (VMlongLt(op1, op2) ? -1 : VMlongGt(op1, op2) ? 1 : 0);
|
||||
}
|
||||
|
||||
// Long conversions
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMlong2Double(jlong val) {
|
||||
return (jdouble) val;
|
||||
}
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMlong2Float(jlong val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMlong2Int(jlong val) {
|
||||
return (jint) val;
|
||||
}
|
||||
|
||||
// Double Arithmetic
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleAdd(jdouble op1, jdouble op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleDiv(jdouble op1, jdouble op2) {
|
||||
return op1 / op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleMul(jdouble op1, jdouble op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleNeg(jdouble op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleRem(jdouble op1, jdouble op2) {
|
||||
return fmod(op1, op2);
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleSub(jdouble op1, jdouble op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMdoubleCompare(jdouble op1, jdouble op2, int32_t direction) {
|
||||
return ( op1 < op2 ? -1 :
|
||||
op1 > op2 ? 1 :
|
||||
op1 == op2 ? 0 :
|
||||
(direction == -1 || direction == 1) ? direction : 0);
|
||||
}
|
||||
|
||||
// Double Conversions
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMdouble2Float(jdouble val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
// Float Conversions
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMfloat2Double(jfloat op) {
|
||||
return (jdouble) op;
|
||||
}
|
||||
|
||||
// Integer Arithmetic
|
||||
|
||||
inline jint BytecodeInterpreter::VMintAdd(jint op1, jint op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintAnd(jint op1, jint op2) {
|
||||
return op1 & op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) {
|
||||
/* it's possible we could catch this special case implicitly */
|
||||
if ((juint)op1 == 0x80000000 && op2 == -1) return op1;
|
||||
else return op1 / op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintMul(jint op1, jint op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintNeg(jint op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintOr(jint op1, jint op2) {
|
||||
return op1 | op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) {
|
||||
/* it's possible we could catch this special case implicitly */
|
||||
if ((juint)op1 == 0x80000000 && op2 == -1) return 0;
|
||||
else return op1 % op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintShl(jint op1, jint op2) {
|
||||
return op1 << (op2 & 0x1f);
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintShr(jint op1, jint op2) {
|
||||
return op1 >> (op2 & 0x1f);
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintSub(jint op1, jint op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline juint BytecodeInterpreter::VMintUshr(jint op1, jint op2) {
|
||||
return ((juint) op1) >> (op2 & 0x1f);
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintXor(jint op1, jint op2) {
|
||||
return op1 ^ op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMint2Double(jint val) {
|
||||
return (jdouble) val;
|
||||
}
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMint2Float(jint val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMint2Long(jint val) {
|
||||
return (jlong) val;
|
||||
}
|
||||
|
||||
inline jchar BytecodeInterpreter::VMint2Char(jint val) {
|
||||
return (jchar) val;
|
||||
}
|
||||
|
||||
inline jshort BytecodeInterpreter::VMint2Short(jint val) {
|
||||
return (jshort) val;
|
||||
}
|
||||
|
||||
inline jbyte BytecodeInterpreter::VMint2Byte(jint val) {
|
||||
return (jbyte) val;
|
||||
}
|
||||
|
||||
#endif // CC_INTERP
|
||||
|
||||
#endif // CPU_PPC_VM_BYTECODEINTERPRETER_PPC_INLINE_HPP
|
31
hotspot/src/cpu/ppc/vm/bytecodes_ppc.cpp
Normal file
31
hotspot/src/cpu/ppc/vm/bytecodes_ppc.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please 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 "interpreter/bytecodes.hpp"
|
||||
|
||||
void Bytecodes::pd_initialize() {
|
||||
// No ppc specific initialization.
|
||||
}
|
31
hotspot/src/cpu/ppc/vm/bytecodes_ppc.hpp
Normal file
31
hotspot/src/cpu/ppc/vm/bytecodes_ppc.hpp
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_PPC_VM_BYTECODES_PPC_HPP
|
||||
#define CPU_PPC_VM_BYTECODES_PPC_HPP
|
||||
|
||||
// No ppc64 specific bytecodes
|
||||
|
||||
#endif // CPU_PPC_VM_BYTECODES_PPC_HPP
|
155
hotspot/src/cpu/ppc/vm/bytes_ppc.hpp
Normal file
155
hotspot/src/cpu/ppc/vm/bytes_ppc.hpp
Normal file
@ -0,0 +1,155 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2013 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_PPC_VM_BYTES_PPC_HPP
|
||||
#define CPU_PPC_VM_BYTES_PPC_HPP
|
||||
|
||||
#include "memory/allocation.hpp"
|
||||
|
||||
class Bytes: AllStatic {
|
||||
public:
|
||||
// Efficient reading and writing of unaligned unsigned data in platform-specific byte ordering
|
||||
// PowerPC needs to check for alignment.
|
||||
|
||||
// Can I count on address always being a pointer to an unsigned char? Yes.
|
||||
|
||||
// Returns true, if the byte ordering used by Java is different from the nativ byte ordering
|
||||
// of the underlying machine. For example, true for Intel x86, False, for Solaris on Sparc.
|
||||
static inline bool is_Java_byte_ordering_different() { return false; }
|
||||
|
||||
// Thus, a swap between native and Java ordering is always a no-op:
|
||||
static inline u2 swap_u2(u2 x) { return x; }
|
||||
static inline u4 swap_u4(u4 x) { return x; }
|
||||
static inline u8 swap_u8(u8 x) { return x; }
|
||||
|
||||
static inline u2 get_native_u2(address p) {
|
||||
return (intptr_t(p) & 1) == 0
|
||||
? *(u2*)p
|
||||
: ( u2(p[0]) << 8 )
|
||||
| ( u2(p[1]) );
|
||||
}
|
||||
|
||||
static inline u4 get_native_u4(address p) {
|
||||
switch (intptr_t(p) & 3) {
|
||||
case 0: return *(u4*)p;
|
||||
|
||||
case 2: return ( u4( ((u2*)p)[0] ) << 16 )
|
||||
| ( u4( ((u2*)p)[1] ) );
|
||||
|
||||
default: return ( u4(p[0]) << 24 )
|
||||
| ( u4(p[1]) << 16 )
|
||||
| ( u4(p[2]) << 8 )
|
||||
| u4(p[3]);
|
||||
}
|
||||
}
|
||||
|
||||
static inline u8 get_native_u8(address p) {
|
||||
switch (intptr_t(p) & 7) {
|
||||
case 0: return *(u8*)p;
|
||||
|
||||
case 4: return ( u8( ((u4*)p)[0] ) << 32 )
|
||||
| ( u8( ((u4*)p)[1] ) );
|
||||
|
||||
case 2: return ( u8( ((u2*)p)[0] ) << 48 )
|
||||
| ( u8( ((u2*)p)[1] ) << 32 )
|
||||
| ( u8( ((u2*)p)[2] ) << 16 )
|
||||
| ( u8( ((u2*)p)[3] ) );
|
||||
|
||||
default: return ( u8(p[0]) << 56 )
|
||||
| ( u8(p[1]) << 48 )
|
||||
| ( u8(p[2]) << 40 )
|
||||
| ( u8(p[3]) << 32 )
|
||||
| ( u8(p[4]) << 24 )
|
||||
| ( u8(p[5]) << 16 )
|
||||
| ( u8(p[6]) << 8 )
|
||||
| u8(p[7]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static inline void put_native_u2(address p, u2 x) {
|
||||
if ( (intptr_t(p) & 1) == 0 ) { *(u2*)p = x; }
|
||||
else {
|
||||
p[0] = x >> 8;
|
||||
p[1] = x;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void put_native_u4(address p, u4 x) {
|
||||
switch ( intptr_t(p) & 3 ) {
|
||||
case 0: *(u4*)p = x;
|
||||
break;
|
||||
|
||||
case 2: ((u2*)p)[0] = x >> 16;
|
||||
((u2*)p)[1] = x;
|
||||
break;
|
||||
|
||||
default: ((u1*)p)[0] = x >> 24;
|
||||
((u1*)p)[1] = x >> 16;
|
||||
((u1*)p)[2] = x >> 8;
|
||||
((u1*)p)[3] = x;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void put_native_u8(address p, u8 x) {
|
||||
switch ( intptr_t(p) & 7 ) {
|
||||
case 0: *(u8*)p = x;
|
||||
break;
|
||||
|
||||
case 4: ((u4*)p)[0] = x >> 32;
|
||||
((u4*)p)[1] = x;
|
||||
break;
|
||||
|
||||
case 2: ((u2*)p)[0] = x >> 48;
|
||||
((u2*)p)[1] = x >> 32;
|
||||
((u2*)p)[2] = x >> 16;
|
||||
((u2*)p)[3] = x;
|
||||
break;
|
||||
|
||||
default: ((u1*)p)[0] = x >> 56;
|
||||
((u1*)p)[1] = x >> 48;
|
||||
((u1*)p)[2] = x >> 40;
|
||||
((u1*)p)[3] = x >> 32;
|
||||
((u1*)p)[4] = x >> 24;
|
||||
((u1*)p)[5] = x >> 16;
|
||||
((u1*)p)[6] = x >> 8;
|
||||
((u1*)p)[7] = x;
|
||||
}
|
||||
}
|
||||
|
||||
// Efficient reading and writing of unaligned unsigned data in Java byte ordering (i.e. big-endian ordering)
|
||||
// (no byte-order reversal is needed since Power CPUs are big-endian oriented).
|
||||
static inline u2 get_Java_u2(address p) { return get_native_u2(p); }
|
||||
static inline u4 get_Java_u4(address p) { return get_native_u4(p); }
|
||||
static inline u8 get_Java_u8(address p) { return get_native_u8(p); }
|
||||
|
||||
static inline void put_Java_u2(address p, u2 x) { put_native_u2(p, x); }
|
||||
static inline void put_Java_u4(address p, u4 x) { put_native_u4(p, x); }
|
||||
static inline void put_Java_u8(address p, u8 x) { put_native_u8(p, x); }
|
||||
};
|
||||
|
||||
#endif // CPU_PPC_VM_BYTES_PPC_HPP
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user