Merge
This commit is contained in:
commit
78db31beb6
4
.hgtags
4
.hgtags
@ -82,3 +82,7 @@ c4c8a5bc54f66abc68cd185d9294042121922154 jdk7-b99
|
||||
1ce7938efb03224ccc8b3cdd7803eb39e889539c jdk7-b105
|
||||
6bdae472f77205046703b685eff2ac4f7a0ecf4e jdk7-b106
|
||||
439de530aac531a360beedba6e2fe51e17292cc0 jdk7-b107
|
||||
044d31b99ef5609389fc771c422e722e5e224228 jdk7-b108
|
||||
e02b4d709e177d08d56130a4bc68061e4bbacc7d jdk7-b109
|
||||
a6442d6bc38a44152e0662688213ce4d2701f42a jdk7-b110
|
||||
69f3edf083477955b5bd2f754252c7504167d8e1 jdk7-b111
|
||||
|
@ -82,3 +82,7 @@ f8be576feefce0c6695f188ef97ec16b73ad9cfd jdk7-b104
|
||||
9f96a4269d7727dad68864eaab795eafce270311 jdk7-b105
|
||||
43096cccf1cee749c2f4e7714ee71f4e9e0f4d7f jdk7-b106
|
||||
7d396ad455c3b2f68b0d7094891c5aba7c757a6e jdk7-b107
|
||||
140fdef4ddf52244013b6157dc542cd9f677bb6f jdk7-b108
|
||||
81dfc728d7bb7e1fff4a4dc6d0f7cea5a3315667 jdk7-b109
|
||||
2a02d4a6955c7c078aee9a604cb3be409800d82c jdk7-b110
|
||||
9702d6fef68e17533ee7fcf5923b11ead3e912ce jdk7-b111
|
||||
|
@ -148,7 +148,7 @@
|
||||
See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
|
||||
SunSolve</a> for patch downloads.
|
||||
</td>
|
||||
<td>Sun Studio 12</td>
|
||||
<td>Sun Studio 12 Update 1 + patches</td>
|
||||
<td>JDK 6u14 FCS </td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -158,7 +158,7 @@
|
||||
See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
|
||||
SunSolve</a> for patch downloads.
|
||||
</td>
|
||||
<td>Sun Studio 12</td>
|
||||
<td>Sun Studio 12 Update 1 + patches</td>
|
||||
<td>JDK 6u14 FCS </td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -168,7 +168,7 @@
|
||||
See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
|
||||
SunSolve</a> for patch downloads.
|
||||
</td>
|
||||
<td>Sun Studio 12</td>
|
||||
<td>Sun Studio 12 Update 1 + patches</td>
|
||||
<td>JDK 6u14 FCS </td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -178,7 +178,7 @@
|
||||
See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
|
||||
SunSolve</a> for patch downloads.
|
||||
</td>
|
||||
<td>Sun Studio 12</td>
|
||||
<td>Sun Studio 12 Update 1 + patches</td>
|
||||
<td>JDK 6u14 FCS </td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -941,21 +941,78 @@
|
||||
<strong><a name="studio">Solaris: Sun Studio</a></strong>
|
||||
<blockquote>
|
||||
At a minimum, the
|
||||
<a href="http://developers.sun.com/sunstudio/index.jsp" target="_blank">
|
||||
Sun Studio 12 Compilers</a>
|
||||
(containing version 5.9 of the C and C++ compilers) is required,
|
||||
with patches from the
|
||||
<a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access" target="_blank">
|
||||
SunSolve web site</a>.
|
||||
<a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.htm" target="_blank">
|
||||
Sun Studio 12 Update 1 Compilers</a>
|
||||
(containing version 5.10 of the C and C++ compilers) is required,
|
||||
including specific patches.
|
||||
<p>
|
||||
The Solaris SPARC patch list is:
|
||||
<ul>
|
||||
<li>
|
||||
118683-05: SunOS 5.10: Patch for profiling libraries and assembler
|
||||
</li>
|
||||
<li>
|
||||
119963-21: SunOS 5.10: Shared library patch for C++
|
||||
</li>
|
||||
<li>
|
||||
120753-08: SunOS 5.10: Microtasking libraries (libmtsk) patch
|
||||
</li>
|
||||
<li>
|
||||
128228-09: Sun Studio 12 Update 1: Patch for Sun C++ Compiler
|
||||
</li>
|
||||
<li>
|
||||
141860-03: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95
|
||||
</li>
|
||||
<li>
|
||||
141861-05: Sun Studio 12 Update 1: Patch for Sun C Compiler
|
||||
</li>
|
||||
<li>
|
||||
142371-01: Sun Studio 12.1 Update 1: Patch for dbx
|
||||
</li>
|
||||
<li>
|
||||
143384-02: Sun Studio 12 Update 1: Patch for debuginfo handling
|
||||
</li>
|
||||
<li>
|
||||
143385-02: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95
|
||||
</li>
|
||||
<li>
|
||||
142369-01: Sun Studio 12.1: Patch for Performance Analyzer Tools
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
The Solaris X86 patch list is:
|
||||
<ul>
|
||||
<li>
|
||||
119961-07: SunOS 5.10_x86, x64, Patch for profiling libraries and assembler
|
||||
</li>
|
||||
<li>
|
||||
119964-21: SunOS 5.10_x86: Shared library patch for C++_x86
|
||||
</li>
|
||||
<li>
|
||||
120754-08: SunOS 5.10_x86: Microtasking libraries (libmtsk) patch
|
||||
</li>
|
||||
<li>
|
||||
141858-06: Sun Studio 12 Update 1_x86: Sun Compiler Common patch for x86 backend
|
||||
</li>
|
||||
<li>
|
||||
128229-09: Sun Studio 12 Update 1_x86: Patch for C++ Compiler
|
||||
</li>
|
||||
<li>
|
||||
142363-05: Sun Studio 12 Update 1_x86: Patch for C Compiler
|
||||
</li>
|
||||
<li>
|
||||
142368-01: Sun Studio 12.1_x86: Patch for Performance Analyzer Tools
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Set
|
||||
<a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>
|
||||
to point to the location of
|
||||
the compiler binaries, and place this location in the <tt>PATH</tt>.
|
||||
<p>
|
||||
The Sun Studio Express compilers at:
|
||||
The Oracle Solaris Studio Express compilers at:
|
||||
<a href="http://developers.sun.com/sunstudio/downloads/express.jsp" target="_blank">
|
||||
Sun Studio Express Download site</a>
|
||||
Oracle Solaris Studio Express Download site</a>
|
||||
are also an option, although these compilers have not
|
||||
been extensively used yet.
|
||||
</blockquote>
|
||||
|
@ -82,3 +82,7 @@ a56d734a1e970e1a21a8f4feb13053e9a33674c7 jdk7-b100
|
||||
6f21b030092fb61244cc8a0aedf8058f7c022b81 jdk7-b105
|
||||
519daea48888196af76a975a3b31258efa860bad jdk7-b106
|
||||
232adb83eae8375439ccff65b6e205ca0da0510d jdk7-b107
|
||||
8d810527b499a67153365db74421a03c12b46f35 jdk7-b108
|
||||
c3dd858e09b20206459d9e7b0ead99d27ab00eab jdk7-b109
|
||||
0e1f80fda2271f53d4bbb59ec3f301dfbcef6a0a jdk7-b110
|
||||
640fa4d4e2ad4c2d7e4815c955026740d8c52b7a jdk7-b111
|
||||
|
@ -61,7 +61,6 @@ ABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
|
||||
CLASSES_DIR = $(BUILD_DIR)/classes
|
||||
GENSRC_DIR = $(BUILD_DIR)/gensrc
|
||||
|
||||
BIN_DIR = $(DIST_DIR)/bin
|
||||
LIB_DIR = $(DIST_DIR)/lib
|
||||
|
||||
#-----
|
||||
|
@ -28,306 +28,10 @@
|
||||
# targeted to Linux. Should not contain any rules.
|
||||
#
|
||||
|
||||
# Warning: the following variables are overriden by Defs.gmk. Set
|
||||
# values will be silently ignored:
|
||||
# CFLAGS (set $(OTHER_CFLAGS) instead)
|
||||
# CPPFLAGS (set $(OTHER_CPPFLAGS) instead)
|
||||
# CXXFLAGS (set $(OTHER_CXXFLAGS) instead)
|
||||
# LDFLAGS (set $(OTHER_LDFAGS) instead)
|
||||
# LDLIBS (set $(EXTRA_LIBS) instead)
|
||||
# LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
|
||||
|
||||
# Get shared JDK settings
|
||||
include $(BUILDDIR)/common/shared/Defs.gmk
|
||||
|
||||
# Part of INCREMENTAL_BUILD mechanism.
|
||||
# Compiler emits things like: path/file.o: file.h
|
||||
# We want something like: relative_path/file.o relative_path/file.d: file.h
|
||||
CC_DEPEND = -MM
|
||||
CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
|
||||
|
||||
ifndef PLATFORM_SRC
|
||||
PLATFORM_SRC = $(TOPDIR)/src/solaris
|
||||
endif # PLATFORM_SRC
|
||||
|
||||
# platform specific include files
|
||||
PLATFORM_INCLUDE_NAME = $(PLATFORM)
|
||||
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
|
||||
|
||||
# suffix used for make dependencies files.
|
||||
DEPEND_SUFFIX = d
|
||||
# The suffix applied to the library name for FDLIBM
|
||||
FDDLIBM_SUFFIX = a
|
||||
# The suffix applied to scripts (.bat for windows, nothing for unix)
|
||||
SCRIPT_SUFFIX =
|
||||
# CC compiler object code output directive flag value
|
||||
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
|
||||
CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
|
||||
|
||||
#
|
||||
# Default HPI libraries. Build will build only native, unless
|
||||
# overriden at the make command line. This makes it convenient for
|
||||
# people doing, say, a pthreads port -- they can create a posix
|
||||
# directory here, and say "gnumake HPIS=posix" at the top
|
||||
# level.
|
||||
#
|
||||
HPIS = native
|
||||
|
||||
#
|
||||
# Default optimization
|
||||
#
|
||||
CC_HIGHEST_OPT = -O3
|
||||
CC_HIGHER_OPT = -O3
|
||||
CC_LOWER_OPT = -O2
|
||||
CC_NO_OPT =
|
||||
|
||||
ifeq ($(PRODUCT), java)
|
||||
_OPT = $(CC_HIGHER_OPT)
|
||||
else
|
||||
_OPT = $(CC_LOWER_OPT)
|
||||
CPPFLAGS_DBG += -DLOGGING
|
||||
endif
|
||||
|
||||
# For all platforms, do not omit the frame pointer register usage.
|
||||
# We need this frame pointer to make it easy to walk the stacks.
|
||||
# This should be the default on X86, but ia64 and amd64 may not have this
|
||||
# as the default.
|
||||
CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
||||
CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
||||
CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
|
||||
CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
|
||||
LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9
|
||||
CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9
|
||||
LDFLAGS_COMMON_sparc += -m32 -mcpu=v9
|
||||
ifeq ($(ZERO_BUILD), true)
|
||||
CFLAGS_REQUIRED = $(ZERO_ARCHFLAG)
|
||||
ifeq ($(ZERO_ENDIANNESS), little)
|
||||
CFLAGS_REQUIRED += -D_LITTLE_ENDIAN
|
||||
endif
|
||||
LDFLAGS_COMMON += $(ZERO_ARCHFLAG)
|
||||
else
|
||||
CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
|
||||
LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH))
|
||||
endif
|
||||
|
||||
# Add in platform specific optimizations for all opt levels
|
||||
CC_HIGHEST_OPT += $(_OPT_$(ARCH))
|
||||
CC_HIGHER_OPT += $(_OPT_$(ARCH))
|
||||
CC_LOWER_OPT += $(_OPT_$(ARCH))
|
||||
|
||||
# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off
|
||||
ifdef NO_OPTIMIZATIONS
|
||||
CC_HIGHEST_OPT = $(CC_NO_OPT)
|
||||
CC_HIGHER_OPT = $(CC_NO_OPT)
|
||||
CC_LOWER_OPT = $(CC_NO_OPT)
|
||||
endif
|
||||
|
||||
#
|
||||
# Selection of warning messages
|
||||
#
|
||||
GCC_INHIBIT = -Wno-unused -Wno-parentheses
|
||||
GCC_STYLE =
|
||||
GCC_WARNINGS = -W -Wall $(GCC_STYLE) $(GCC_INHIBIT)
|
||||
|
||||
#
|
||||
# Treat compiler warnings as errors, if warnings not allowed
|
||||
#
|
||||
ifeq ($(COMPILER_WARNINGS_FATAL),true)
|
||||
GCC_WARNINGS += -Werror
|
||||
endif
|
||||
|
||||
#
|
||||
# Misc compiler options
|
||||
#
|
||||
ifeq ($(ARCH),ppc)
|
||||
CFLAGS_COMMON = -fsigned-char
|
||||
else # ARCH
|
||||
CFLAGS_COMMON = -fno-strict-aliasing
|
||||
endif # ARCH
|
||||
PIC_CODE_LARGE = -fPIC
|
||||
PIC_CODE_SMALL = -fpic
|
||||
GLOBAL_KPIC = $(PIC_CODE_LARGE)
|
||||
ifeq ($(ARCH), amd64)
|
||||
CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS) -pipe
|
||||
else
|
||||
CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS)
|
||||
endif
|
||||
|
||||
# Linux 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
|
||||
DEBUG_FLAG = -g
|
||||
ifeq ($(FASTDEBUG), true)
|
||||
ifeq ($(ARCH_DATA_MODEL), 64)
|
||||
DEBUG_FLAG = -g1
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS_OPT = $(POPT)
|
||||
CFLAGS_DBG = $(DEBUG_FLAG)
|
||||
CFLAGS_COMMON += $(CFLAGS_REQUIRED)
|
||||
|
||||
CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
|
||||
CXXFLAGS_OPT = $(POPT)
|
||||
CXXFLAGS_DBG = $(DEBUG_FLAG)
|
||||
CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
|
||||
|
||||
# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java
|
||||
ifeq ($(FASTDEBUG), true)
|
||||
CFLAGS_DBG += $(CC_LOWER_OPT)
|
||||
CXXFLAGS_DBG += $(CC_LOWER_OPT)
|
||||
endif
|
||||
|
||||
CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
|
||||
|
||||
# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
|
||||
ifneq ($(ARCH),alpha)
|
||||
CPP_ARCH_FLAGS += -D$(ARCH)
|
||||
else
|
||||
CPP_ARCH_FLAGS += -D_$(ARCH)_
|
||||
endif
|
||||
|
||||
CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -DLINUX $(VERSION_DEFINES) \
|
||||
-D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
|
||||
|
||||
ifeq ($(ARCH_DATA_MODEL), 64)
|
||||
CPPFLAGS_COMMON += -D_LP64=1
|
||||
endif
|
||||
|
||||
CPPFLAGS_OPT =
|
||||
CPPFLAGS_DBG = -DDEBUG
|
||||
|
||||
ifdef LIBRARY
|
||||
# Libraries need to locate other libraries at runtime, and you can tell
|
||||
# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
|
||||
# buried inside the .so. The $ORIGIN says to look relative to where
|
||||
# the library itself is and it can be followed with relative paths from
|
||||
# that. By default we always look in $ORIGIN, optionally we add relative
|
||||
# paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
|
||||
# On Linux we add a flag -z origin, not sure if this is necessary, but
|
||||
# doesn't seem to hurt.
|
||||
# The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
|
||||
# Try: 'readelf -d lib*.so' to see these settings in a library.
|
||||
#
|
||||
LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN
|
||||
LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%)
|
||||
endif
|
||||
|
||||
EXTRA_LIBS += -lc
|
||||
|
||||
LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs
|
||||
LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION)
|
||||
|
||||
#
|
||||
# -L paths for finding and -ljava
|
||||
#
|
||||
LDFLAGS_OPT = -Xlinker -O1
|
||||
LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
|
||||
LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
|
||||
|
||||
#
|
||||
# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
|
||||
# statically link libgcc but will print a warning with the flag. We don't
|
||||
# want the warning, so check gcc version first.
|
||||
#
|
||||
CC_VER_MAJOR := $(shell $(CC) -dumpversion | $(SED) 's/egcs-//' | $(CUT) -d'.' -f1)
|
||||
ifeq ("$(CC_VER_MAJOR)", "3")
|
||||
OTHER_LDFLAGS += -static-libgcc
|
||||
endif
|
||||
|
||||
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
|
||||
# (See Rules.gmk) The gcc 5 compiler might have an option for this?
|
||||
AUTOMATIC_PCH_OPTION =
|
||||
|
||||
#
|
||||
# Post Processing of libraries/executables
|
||||
#
|
||||
ifeq ($(VARIANT), OPT)
|
||||
ifneq ($(NO_STRIP), true)
|
||||
# Debug 'strip -g' leaves local function Elf symbols (better stack traces)
|
||||
POST_STRIP_PROCESS = $(STRIP) -g
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o
|
||||
#
|
||||
LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
|
||||
|
||||
#
|
||||
# Support for Quantify.
|
||||
#
|
||||
ifdef QUANTIFY
|
||||
QUANTIFY_CMD = quantify
|
||||
QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
|
||||
LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
|
||||
endif
|
||||
|
||||
#
|
||||
# Path and option to link against the VM, if you have to. Note that
|
||||
# there are libraries that link against only -ljava, but they do get
|
||||
# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
|
||||
# the library itself should not.
|
||||
#
|
||||
VM_NAME = server
|
||||
JVMLIB = -L$(BOOTDIR)/jre/lib/$(LIBARCH)/$(VM_NAME) -ljvm
|
||||
JAVALIB = -L$(BOOTDIR)/jre/lib/$(LIBARCH) -ljava $(JVMLIB)
|
||||
|
||||
#
|
||||
# We want to privatize JVM symbols on Solaris. This is so the user can
|
||||
# write a function called FindClass and this should not override the
|
||||
# FindClass that is inside the JVM. At this point in time we are not
|
||||
# concerned with other JNI libraries because we hope that there will
|
||||
# not be as many clashes there.
|
||||
#
|
||||
PRIVATIZE_JVM_SYMBOLS = false
|
||||
|
||||
USE_PTHREADS = true
|
||||
override ALT_CODESET_KEY = _NL_CTYPE_CODESET_NAME
|
||||
override AWT_RUNPATH =
|
||||
override HAVE_ALTZONE = false
|
||||
override HAVE_FILIOH = false
|
||||
override HAVE_GETHRTIME = false
|
||||
override HAVE_GETHRVTIME = false
|
||||
override HAVE_SIGIGNORE = true
|
||||
override LEX_LIBRARY = -lfl
|
||||
ifeq ($(STATIC_CXX),true)
|
||||
override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
|
||||
else
|
||||
override LIBCXX = -lstdc++
|
||||
endif
|
||||
override LIBPOSIX4 =
|
||||
override LIBSOCKET =
|
||||
override LIBTHREAD =
|
||||
override MOOT_PRIORITIES = true
|
||||
override NO_INTERRUPTIBLE_IO = true
|
||||
override OPENWIN_HOME = /usr/X11R6
|
||||
ifeq ($(ARCH), amd64)
|
||||
override OPENWIN_LIB = $(OPENWIN_HOME)/lib64
|
||||
else
|
||||
override OPENWIN_LIB = $(OPENWIN_HOME)/lib
|
||||
endif
|
||||
override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER
|
||||
override SUN_CMM_SUBDIR =
|
||||
override THREADS_FLAG = native
|
||||
override USE_GNU_M4 = true
|
||||
override USING_GNU_TAR = true
|
||||
override WRITE_LIBVERSION = false
|
||||
|
||||
# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the
|
||||
# resulting resolved absolute name of the executable in the environment
|
||||
# variable EXECNAME. That executable name is then used that to locate the
|
||||
# installation area.
|
||||
override USE_EXECNAME = true
|
||||
|
||||
# If your platform has DPS, it will have Type1 fonts too, in which case
|
||||
# it is best to enable DPS support until such time as 2D's rasteriser
|
||||
# can fully handle Type1 fonts in all cases. Default is "yes".
|
||||
# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
|
||||
# DPS (Displayable PostScript) is available on Solaris machines
|
||||
HAVE_DPS = no
|
||||
|
||||
#
|
||||
# Japanese manpages
|
||||
#
|
||||
JA_SOURCE_ENCODING = eucJP
|
||||
JA_TARGET_ENCODINGS = eucJP
|
||||
|
||||
|
@ -28,16 +28,6 @@
|
||||
# targeted to Solaris. Should not contain any rules.
|
||||
#
|
||||
|
||||
# Warning: the following variables are overridden by Defs.gmk. Set
|
||||
# values will be silently ignored:
|
||||
# CFLAGS (set $(OTHER_CFLAGS) instead)
|
||||
# CPPFLAGS (set $(OTHER_CPPFLAGS) instead)
|
||||
# CXXFLAGS (set $(OTHER_CXXFLAGS) instead)
|
||||
# LDFLAGS (set $(OTHER_LDFAGS) instead)
|
||||
# LDLIBS (set $(EXTRA_LIBS) instead)
|
||||
# LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
|
||||
# LINTFLAGS (set $(OTHER_LINTFLAGS) instead)
|
||||
|
||||
# Get shared JDK settings
|
||||
include $(BUILDDIR)/common/shared/Defs.gmk
|
||||
|
||||
@ -45,600 +35,3 @@ ifndef PLATFORM_SRC
|
||||
PLATFORM_SRC = $(TOPDIR)/src/solaris
|
||||
endif # PLATFORM_SRC
|
||||
|
||||
# platform specific include files
|
||||
PLATFORM_INCLUDE_NAME = $(PLATFORM)
|
||||
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
|
||||
|
||||
# suffix used for make dependencies files
|
||||
DEPEND_SUFFIX = d
|
||||
# suffix used for lint files
|
||||
LINT_SUFFIX = ln
|
||||
# The suffix applied to the library name for FDLIBM
|
||||
FDDLIBM_SUFFIX = a
|
||||
# The suffix applied to scripts (.bat for windows, nothing for unix)
|
||||
SCRIPT_SUFFIX =
|
||||
# CC compiler object code output directive flag value
|
||||
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
|
||||
CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
|
||||
|
||||
#
|
||||
# Default HPI libraries. Build will build only native unless
|
||||
# overriden at the make command line. This makes it convenient for
|
||||
# people doing, say, a pthreads port -- they can create a posix
|
||||
# directory here, and say "gnumake HPIS=posix" at the top
|
||||
# level.
|
||||
#
|
||||
HPIS = native
|
||||
|
||||
#
|
||||
# Java default optimization (-x04/-O2) etc. Applies to the VM.
|
||||
#
|
||||
ifeq ($(PRODUCT), java)
|
||||
_OPT = $(CC_HIGHER_OPT)
|
||||
else
|
||||
_OPT = $(CC_LOWER_OPT)
|
||||
CPPFLAGS_DBG += -DLOGGING -DDBINFO
|
||||
endif
|
||||
|
||||
#
|
||||
# If -Xa is in CFLAGS_COMMON it will end up ahead of $(POPT) for the
|
||||
# optimized build, and that ordering of the flags completely freaks
|
||||
# out cc. Hence, -Xa is instead in each CFLAGS variant.
|
||||
#
|
||||
# The more unusual options to the Sun C compiler:
|
||||
# -v Stricter type checking, more error checking
|
||||
# (To turn ALL warnings into fatals, use -errwarn=%all)
|
||||
# -xstrconst Place string literals and constants in read-only area
|
||||
# (means you can't write on your string literals)
|
||||
# -xs Force debug information (stabs) into the .so or a.out
|
||||
# (makes the library/executable debuggable without the
|
||||
# .o files needing to be around, but at a space cost)
|
||||
# -g & -O If you add the -g option to the optimized compiles
|
||||
# you will get better stack retraces, the code is
|
||||
# still optimized. This includes a space cost too.
|
||||
# -xc99=%none Do NOT allow for c99 extensions to be used.
|
||||
# e.g. declarations must precede statements
|
||||
# -xCC Allow the C++ style of comments in C: //
|
||||
# Required with many of the source files.
|
||||
# -mt Assume multi-threaded (important)
|
||||
#
|
||||
|
||||
#
|
||||
# Debug flag for C and C++ compiler
|
||||
#
|
||||
CFLAGS_DEBUG_OPTION=-g
|
||||
CXXFLAGS_DEBUG_OPTION=-g
|
||||
|
||||
# Turn off -g if we are doing tcov build
|
||||
ifdef TCOV_BUILD
|
||||
CFLAGS_DEBUG_OPTION=
|
||||
CXXFLAGS_DEBUG_OPTION=
|
||||
endif
|
||||
|
||||
# FASTDEBUG: Optimize the -g builds, gives us a faster debug java
|
||||
# If true adds -O to the debug compiles. This allows for any assert
|
||||
# tests to remain and debug checking. The resulting code is faster
|
||||
# but less debuggable. Stack traces are still valid, although only
|
||||
# approximate line numbers are given. Printing of local variables
|
||||
# during a debugging session is not possible, but stepping and
|
||||
# printing of global or static variables should be possible.
|
||||
# Performance/size of files should be about the same, maybe smaller.
|
||||
#
|
||||
ifeq ($(FASTDEBUG), true)
|
||||
CC_FASTDEBUG_OPT = $(CC_LOWER_OPT)
|
||||
CFLAGS_DEBUG_OPTION = -g $(CC_FASTDEBUG_OPT)
|
||||
CXXFLAGS_DEBUG_OPTION = -g0 $(CC_FASTDEBUG_OPT)
|
||||
endif
|
||||
|
||||
CFLAGS_COMMON = -v -mt -L$(OBJDIR) -xc99=%none
|
||||
CFLAGS_COMMON += -xCC
|
||||
CFLAGS_COMMON += -errshort=tags
|
||||
CFLAGS_OPT = $(POPT)
|
||||
CFLAGS_DBG = $(CFLAGS_DEBUG_OPTION)
|
||||
CFLAGS_COMMON += -Xa $(CFLAGS_REQUIRED)
|
||||
|
||||
# Assume MT behavior all the time (important)
|
||||
CXXFLAGS_COMMON = -mt
|
||||
|
||||
# Assume no C++ exceptions are used
|
||||
CXXFLAGS_COMMON += -features=no%except -DCC_NOEX
|
||||
|
||||
# For C++, these options tell it to assume nothing about locating libraries
|
||||
# either at compile time, or at runtime. Use of these options will likely
|
||||
# require the use of -L and -R options to indicate where libraries will
|
||||
# be found at compile time (-L) and at runtime (-R).
|
||||
# The /usr/lib location comes for free, so no need to specify that one.
|
||||
# Note: C is much simplier and there is no need for these options. This
|
||||
# is mostly needed to avoid dependencies on libraries in the
|
||||
# Compiler install area, also see LIBCXX and LIBM.
|
||||
CXXFLAGS_COMMON += -norunpath -xnolib
|
||||
|
||||
#
|
||||
# Treat compiler warnings as errors, if requested
|
||||
#
|
||||
ifeq ($(COMPILER_WARNINGS_FATAL),true)
|
||||
CFLAGS_COMMON += -errwarn=%all
|
||||
CXXFLAGS_COMMON += -errwarn=%all
|
||||
endif
|
||||
|
||||
CXXFLAGS_OPT = $(POPT)
|
||||
CXXFLAGS_DBG = $(CXXFLAGS_DEBUG_OPTION)
|
||||
CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
|
||||
|
||||
# Add -xstrconst to the library compiles. This forces all string
|
||||
# literals into the read-only data section, which prevents them from
|
||||
# being written to and increases the runtime pages shared on the system.
|
||||
#
|
||||
ifdef LIBRARY
|
||||
CFLAGS_COMMON +=-xstrconst
|
||||
endif
|
||||
|
||||
# Source browser database
|
||||
#
|
||||
# COMPILE_WITH_SB
|
||||
# If defined adds -xsb to compiles and creates a
|
||||
# source browsing database during compilation.
|
||||
#
|
||||
ifdef COMPILE_WITH_SB
|
||||
ifeq ($(LIBRARY), java)
|
||||
CFLAGS_DBG += -xsb
|
||||
endif
|
||||
endif
|
||||
|
||||
# Lint Flags:
|
||||
# -Xa ANSI C plus K&R, favor ANSI rules
|
||||
# -Xarch=XXX Same as 'cc -xarch=XXX'
|
||||
# -fd report on old style func defs
|
||||
# -errchk=structarg report on 64bit struct args by value
|
||||
# -errchk=longptr64 report on 64bit to 32bit issues (ignores casts)
|
||||
# -errchk=parentheses report on suggested use of extra parens
|
||||
# -v suppress unused args
|
||||
# -x suppress unused externs
|
||||
# -u suppress extern func/vars used/defined
|
||||
# -errfmt=simple use one line errors with position info
|
||||
|
||||
LINTFLAGS_COMMON = -Xa
|
||||
LINTFLAGS_COMMON += -fd
|
||||
LINTFLAGS_COMMON += -errchk=structarg,longptr64,parentheses
|
||||
LINTFLAGS_COMMON += -v
|
||||
LINTFLAGS_COMMON += -x
|
||||
LINTFLAGS_COMMON += -u
|
||||
LINTFLAGS_COMMON += -errfmt=simple
|
||||
LINTFLAGS_OPT =
|
||||
LINTFLAGS_DBG =
|
||||
|
||||
# The -W0,-noglobal tells the compiler to NOT generate mangled global
|
||||
# ELF data symbols for file local static data.
|
||||
# This can break fix&continue, but we'd rather do the same compilations
|
||||
# for deliverable bits as we do for non-deliverable bits
|
||||
# Tell the compilers to never generate globalized names, all the time.
|
||||
CFLAGS_COMMON += -W0,-noglobal
|
||||
|
||||
# Arch specific settings (determines type of .o files and instruction set)
|
||||
ifeq ($(ARCH_FAMILY), sparc)
|
||||
ifdef VIS_NEEDED
|
||||
XARCH_VALUE/32=v8plusa
|
||||
XARCH_VALUE/64=v9a
|
||||
else
|
||||
# Someday this should change to improve optimization on UltraSPARC
|
||||
# and abandon the old v8-only machines like the SPARCstation 10.
|
||||
# Indications with Mustang is that alacrity runs do not show a
|
||||
# big improvement using v8plus over v8, but other benchmarks might.
|
||||
XARCH_VALUE/32=v8
|
||||
XARCH_VALUE/64=v9
|
||||
endif
|
||||
endif
|
||||
ifeq ($(ARCH_FAMILY), i586)
|
||||
XARCH_VALUE/64=amd64
|
||||
XARCH_VALUE/32=
|
||||
endif
|
||||
|
||||
# Arch value based on current data model being built
|
||||
XARCH_VALUE=$(XARCH_VALUE/$(ARCH_DATA_MODEL))
|
||||
ifneq ($(XARCH_VALUE), )
|
||||
# The actual compiler -xarch options to use
|
||||
XARCH_OPTION/32 = -xarch=$(XARCH_VALUE/32)
|
||||
XARCH_OPTION/64 = -xarch=$(XARCH_VALUE/64)
|
||||
XARCH_OPTION = $(XARCH_OPTION/$(ARCH_DATA_MODEL))
|
||||
endif
|
||||
|
||||
# If we have a specific -xarch value to use, add it
|
||||
ifdef XARCH_OPTION
|
||||
CFLAGS_COMMON += $(XARCH_OPTION)
|
||||
CXXFLAGS_COMMON += $(XARCH_OPTION)
|
||||
ASFLAGS_COMMON += $(XARCH_OPTION)
|
||||
EXTRA_LIBS += $(XARCH_OPTION)
|
||||
LINTFLAGS_COMMON += -Xarch=$(XARCH_VALUE)
|
||||
endif
|
||||
|
||||
#
|
||||
# uncomment the following to build with PERTURBALOT set
|
||||
#
|
||||
# OTHER_CFLAGS += -DPERTURBALOT
|
||||
#
|
||||
|
||||
CPPFLAGS_COMMON = -D$(ARCH_FAMILY) -D__solaris__ -D_REENTRANT
|
||||
CPPFLAGS_OPT =
|
||||
CPPFLAGS_DBG = -DDEBUG
|
||||
|
||||
ifeq ($(ARCH_FAMILY), i586)
|
||||
# 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
|
||||
#
|
||||
CPPFLAGS_COMMON += -DcpuIntel -D_LITTLE_ENDIAN= -D$(LIBARCH)
|
||||
# Turn off a superfluous compiler error message on Intel
|
||||
CFLAGS_COMMON += -erroff=E_BAD_PRAGMA_PACK_VALUE
|
||||
endif
|
||||
|
||||
# Java memory management is based on memory mapping by default, but a
|
||||
# system only assuming malloc/free can be built by adding -DUSE_MALLOC
|
||||
|
||||
CPPFLAGS_COMMON += -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS
|
||||
CPPFLAGS_OPT += -DTRIMMED
|
||||
|
||||
LDFLAGS_DEFS_OPTION = -z defs
|
||||
LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION)
|
||||
|
||||
#
|
||||
# -L paths for finding and -ljava
|
||||
#
|
||||
LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
|
||||
LDFLAGS_OPT =
|
||||
LDFLAGS_DBG =
|
||||
|
||||
#
|
||||
# We never really want the incremental linker, ever
|
||||
# The -xildoff option tells Sun's compilers to NOT use incremental linker
|
||||
#
|
||||
LDFLAGS_COMMON += -xildoff
|
||||
|
||||
ifdef LIBRARY
|
||||
# Libraries need to locate other libraries at runtime, and you can tell
|
||||
# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
|
||||
# buried inside the .so. The $ORIGIN says to look relative to where
|
||||
# the library itself is and it can be followed with relative paths from
|
||||
# that. By default we always look in $ORIGIN, optionally we add relative
|
||||
# paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
|
||||
# The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
|
||||
# Try: 'dump -Lv lib*.so' to see these settings in a library.
|
||||
#
|
||||
LDFLAGS_COMMON += -R\$$ORIGIN
|
||||
LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-R\$$ORIGIN/%)
|
||||
endif
|
||||
|
||||
EXTRA_LIBS += -lc
|
||||
|
||||
# Postprocessing is done on the images directories only
|
||||
#
|
||||
ifeq ($(VARIANT), OPT)
|
||||
ifeq ($(PARTIAL_GPROF), true)
|
||||
NO_STRIP = true
|
||||
endif
|
||||
ifeq ($(GPROF), true)
|
||||
NO_STRIP = true
|
||||
endif
|
||||
ifneq ($(NO_STRIP), true)
|
||||
# Debug 'strip -x' leaves local function Elf symbols (better stack traces)
|
||||
POST_STRIP_PROCESS = $(STRIP) -x
|
||||
endif
|
||||
endif
|
||||
POST_MCS_PROCESS=$(MCS) -d -a "JDK $(FULL_VERSION)"
|
||||
|
||||
#
|
||||
# Sun C compiler will take -M and pass it on to ld.
|
||||
# Usage: ld $(LD_MAPFILE_FLAG) mapfile *.o
|
||||
#
|
||||
ifeq ($(CC_VERSION),gcc)
|
||||
LD_MAPFILE_FLAG = -Xlinker -M -Xlinker
|
||||
else
|
||||
LD_MAPFILE_FLAG = -M
|
||||
endif
|
||||
|
||||
#
|
||||
# Variables globally settable from the make command line (default
|
||||
# values in brackets):
|
||||
# GPROF (false)
|
||||
# Eg: % gnumake GPROF=true
|
||||
GPROF = false
|
||||
ifeq ($(GPROF), true)
|
||||
CFLAGS_COMMON += -DGPROF -xpg
|
||||
EXTRA_LIBS += -xpg
|
||||
endif
|
||||
|
||||
# PARTIAL_GPROF is to be used ONLY during compilation - it should not
|
||||
# appear during linking of libraries or programs. It also should
|
||||
# prevent linking with -z defs to allow a symbol to remain undefined.
|
||||
#
|
||||
PARTIAL_GPROF = false
|
||||
ifeq ($(PARTIAL_GPROF), true)
|
||||
CFLAGS_GPROF += -xpg
|
||||
LDFLAGS_DEFS_OPTION = -z nodefs
|
||||
endif
|
||||
|
||||
#
|
||||
# For a TCOV build we add in the TCOV_OPTION
|
||||
#
|
||||
ifdef TCOV_BUILD
|
||||
TCOV_OPTION = -xprofile=tcov
|
||||
LDFLAGS_COMMON += $(TCOV_OPTION) -Kpic
|
||||
CFLAGS_COMMON += $(TCOV_OPTION)
|
||||
CXXFLAGS_COMMON += $(TCOV_OPTION)
|
||||
EXTRA_LIBS += $(TCOV_OPTION)
|
||||
LDNOMAP=true
|
||||
endif
|
||||
|
||||
#
|
||||
# Solaris only uses native threads.
|
||||
#
|
||||
THREADS_FLAG= native
|
||||
THREADS_DIR= threads
|
||||
|
||||
#
|
||||
# Support for Quantify.
|
||||
#
|
||||
ifdef QUANTIFY
|
||||
QUANTIFY_CMD = quantify
|
||||
QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
|
||||
LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
|
||||
ifdef LIBRARY
|
||||
CFLAGS_COMMON += -K PIC
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Support for Purify.
|
||||
#
|
||||
ifdef PURIFY
|
||||
PURIFY_CMD = /net/suntools.eng/export/tools/sparc/bin/purify
|
||||
PURIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
|
||||
LINK_PRE_CMD = $(PURIFY_CMD) $(PURIFY_OPTIONS)
|
||||
ifdef LIBRARY
|
||||
CFLAGS_COMMON += -K PIC
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Different "levels" of optimization.
|
||||
#
|
||||
ifeq ($(CC_VERSION),gcc)
|
||||
CC_HIGHEST_OPT = -O3
|
||||
CC_HIGHER_OPT = -O3
|
||||
CC_LOWER_OPT = -O2
|
||||
CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer
|
||||
CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer
|
||||
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
|
||||
# (See Rules.gmk) May need to wait for gcc 5?
|
||||
AUTOMATIC_PCH_OPTION =
|
||||
else
|
||||
# Highest could be -xO5, but indications are that -xO5 should be reserved
|
||||
# for a per-file use, on sources with known performance impacts.
|
||||
CC_HIGHEST_OPT = -xO4
|
||||
CC_HIGHER_OPT = -xO4
|
||||
CC_LOWER_OPT = -xO2
|
||||
#
|
||||
# WARNING: Use of _OPT=$(CC_HIGHEST_OPT) 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.
|
||||
#
|
||||
# Use non-standard floating point mode (not IEEE 754)
|
||||
CC_HIGHEST_OPT += -fns
|
||||
# Do some simplification of floating point arithmetic (not IEEE 754)
|
||||
CC_HIGHEST_OPT += -fsimple
|
||||
# Use single precision floating point with 'float'
|
||||
CC_HIGHEST_OPT += -fsingle
|
||||
# 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)
|
||||
CC_HIGHEST_OPT += -xalias_level=basic
|
||||
# Use intrinsic or inline versions for math/std functions
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
CC_HIGHEST_OPT += -xbuiltin=%all
|
||||
# Loop data dependency optimizations (need -xO3 or higher)
|
||||
CC_HIGHEST_OPT += -xdepend
|
||||
# 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)
|
||||
CC_HIGHEST_OPT += -xrestrict
|
||||
# Inline some library routines
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
CC_HIGHEST_OPT += -xlibmil
|
||||
# Use optimized math routines
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
|
||||
# CC_HIGHEST_OPT += -xlibmopt
|
||||
ifeq ($(ARCH_FAMILY), sparc)
|
||||
# Assume at most 8byte alignment, raise SIGBUS on error
|
||||
### Presents an ABI issue with customer JNI libs?
|
||||
####CC_HIGHEST_OPT += -xmemalign=8s
|
||||
# Automatic prefetch instructions, explicit prefetch macros
|
||||
CC_HIGHEST_OPT += -xprefetch=auto,explicit
|
||||
# Pick ultra as the chip to optimize to
|
||||
CC_HIGHEST_OPT += -xchip=ultra
|
||||
endif
|
||||
ifeq ($(ARCH), i586)
|
||||
# Pick pentium as the chip to optimize to
|
||||
CC_HIGHEST_OPT += -xchip=pentium
|
||||
endif
|
||||
ifdef LIBRARY
|
||||
# The Solaris CBE (Common Build Environment) requires that the use
|
||||
# of appl registers be disabled when compiling a public library (or
|
||||
# a library that's loaded by a public library) on sparc.
|
||||
CFLAGS_REQUIRED_sparc += -xregs=no%appl
|
||||
CFLAGS_REQUIRED_sparcv9 += -xregs=no%appl
|
||||
endif
|
||||
ifeq ($(shell $(EXPR) $(CC_VER) \> 5.6), 1)
|
||||
# Do NOT use the frame pointer register as a general purpose opt register
|
||||
CFLAGS_REQUIRED_i586 += -xregs=no%frameptr
|
||||
CFLAGS_REQUIRED_amd64 += -xregs=no%frameptr
|
||||
# We MUST allow data alignment of 4 for sparc V8 (32bit)
|
||||
# Presents an ABI issue with customer JNI libs? We must be able to
|
||||
# to handle 4byte aligned objects? (rare occurance, but possible?)
|
||||
CFLAGS_REQUIRED_sparc += -xmemalign=4s
|
||||
endif
|
||||
# Just incase someone trys to use the SOS9 compilers
|
||||
ifeq ($(CC_VER), 5.6)
|
||||
# We MUST allow data alignment of 4 for sparc (sparcv9 is ok at 8s)
|
||||
CFLAGS_REQUIRED_sparc += -xmemalign=4s
|
||||
endif
|
||||
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
|
||||
# (See Rules.gmk) The SS11 -xpch=auto* options appear to be broken.
|
||||
AUTOMATIC_PCH_OPTION =
|
||||
endif
|
||||
CC_NO_OPT =
|
||||
|
||||
# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off
|
||||
ifdef NO_OPTIMIZATIONS
|
||||
CC_HIGHEST_OPT = $(CC_NO_OPT)
|
||||
CC_HIGHER_OPT = $(CC_NO_OPT)
|
||||
CC_LOWER_OPT = $(CC_NO_OPT)
|
||||
endif
|
||||
|
||||
# Flags required all the time
|
||||
CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
|
||||
|
||||
# Add processor specific options for optimizations
|
||||
CC_HIGHEST_OPT += $(_OPT_$(ARCH))
|
||||
CC_HIGHER_OPT += $(_OPT_$(ARCH))
|
||||
CC_LOWER_OPT += $(_OPT_$(ARCH))
|
||||
|
||||
# Secret compiler optimization options that should be in the above macros
|
||||
# but since they differ in format from C to C++, are added into the C or
|
||||
# C++ specific macros for compiler flags.
|
||||
#
|
||||
# On i586 we need to tell the code generator to ALWAYS use a
|
||||
# frame pointer.
|
||||
ifeq ($(ARCH_FAMILY), i586)
|
||||
# Note that in 5.7, this is done with -xregs=no%frameptr
|
||||
ifeq ($(CC_VER), 5.5)
|
||||
# It's not exactly clear when this optimization kicks in, the
|
||||
# current assumption is -xO4 or greater and for C++ with
|
||||
# the -features=no%except option and -xO4 and greater.
|
||||
# Bottom line is, we ALWAYS want a frame pointer!
|
||||
CXXFLAGS_OPT += -Qoption ube -Z~B
|
||||
CFLAGS_OPT += -Wu,-Z~B
|
||||
ifeq ($(FASTDEBUG), true)
|
||||
CXXFLAGS_DBG += -Qoption ube -Z~B
|
||||
CFLAGS_DBG += -Wu,-Z~B
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
#
|
||||
# Optimizer for sparc needs to be told not to do certain things
|
||||
# related to frames or save instructions.
|
||||
ifeq ($(ARCH_FAMILY), sparc)
|
||||
# NOTE: Someday the compilers will provide a high-level option for this.
|
||||
# Use save instructions instead of add instructions
|
||||
# This was an optimization starting in SC5.0 that made it hard for us to
|
||||
# find the "save" instruction (which got turned into an "add")
|
||||
CXXFLAGS_OPT += -Qoption cg -Qrm-s
|
||||
CFLAGS_OPT += -Wc,-Qrm-s
|
||||
ifeq ($(FASTDEBUG), true)
|
||||
CXXFLAGS_DBG += -Qoption cg -Qrm-s
|
||||
CFLAGS_DBG += -Wc,-Qrm-s
|
||||
endif
|
||||
#
|
||||
# NOTE: Someday the compilers will provide a high-level option for this.
|
||||
# Don't allow tail call code optimization. Started in SC5.0.
|
||||
# We don't like code of this form:
|
||||
# save
|
||||
# <code>
|
||||
# call foo
|
||||
# restore
|
||||
# because we can't tell if the method will have a stack frame
|
||||
# and register windows or not.
|
||||
CXXFLAGS_OPT += -Qoption cg -Qiselect-T0
|
||||
CFLAGS_OPT += -Wc,-Qiselect-T0
|
||||
ifeq ($(FASTDEBUG), true)
|
||||
CXXFLAGS_DBG += -Qoption cg -Qiselect-T0
|
||||
CFLAGS_DBG += -Wc,-Qiselect-T0
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Path and option to link against the VM, if you have to. Note that
|
||||
# there are libraries that link against only -ljava, but they do get
|
||||
# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
|
||||
# the library itself should not.
|
||||
#
|
||||
VM_NAME = server
|
||||
JVMLIB = -L$(BOOTDIR)/jre/lib/$(LIBARCH)/server -ljvm
|
||||
JAVALIB =
|
||||
|
||||
# Part of INCREMENTAL_BUILD mechanism.
|
||||
# Compiler emits things like: path/file.o: file.h
|
||||
# We want something like: relative_path/file.o relative_path/file.d: file.h
|
||||
# In addition on Solaris, any include file starting with / is deleted,
|
||||
# this gets rid of things like /usr/include files, which never change.
|
||||
CC_DEPEND = -xM1
|
||||
CC_DEPEND_FILTER = $(SED) -e '/:[ ]*[/]/d' -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' | $(SORT) -u
|
||||
|
||||
# Location of openwin libraries (do we really need this anymore?)
|
||||
OPENWIN_HOME = /usr/openwin
|
||||
OPENWIN_LIB = $(OPENWIN_HOME)/lib$(ISA_DIR)
|
||||
|
||||
# Runtime graphics library search paths...
|
||||
OPENWIN_RUNTIME_LIB = /usr/openwin/lib$(ISA_DIR)
|
||||
AWT_RUNPATH = -R/usr/dt/lib$(ISA_DIR) -R$(OPENWIN_RUNTIME_LIB)
|
||||
|
||||
# C++ Runtime library (libCrun.so), use instead of -lCrun.
|
||||
# Originally used instead of -lCrun to guarantee use of the system
|
||||
# .so version and not the .a or .so that came with the compilers.
|
||||
# With the newer compilers this could probably change back to -lCrun but
|
||||
# in general this is ok to continue to do.
|
||||
LIBCXX = /usr/lib$(ISA_DIR)/libCrun.so.1
|
||||
|
||||
# Math Library (libm.so), do not use -lm.
|
||||
# There might be two versions of libm.so on the build system:
|
||||
# libm.so.1 and libm.so.2, and we want libm.so.1.
|
||||
# Depending on the Solaris release being used to build with,
|
||||
# /usr/lib/libm.so could point at a libm.so.2, so we are
|
||||
# explicit here so that the libjvm.so you have built will work on an
|
||||
# older Solaris release that might not have libm.so.2.
|
||||
# This is a critical factor in allowing builds on Solaris 10 or newer
|
||||
# to run on Solaris 8 or 9.
|
||||
#
|
||||
# Note: Historically there was also a problem picking up a static version
|
||||
# of libm.a from the compiler area, but that problem has gone away
|
||||
# with the newer compilers. Use of libm.a would cause .so bloat.
|
||||
#
|
||||
LIBM = /usr/lib$(ISA_DIR)/libm.so.1
|
||||
|
||||
# Socket library
|
||||
LIBSOCKET = -lsocket
|
||||
|
||||
# GLOBAL_KPIC: If set means all libraries are PIC, position independent code
|
||||
# EXCEPT for select compiles
|
||||
# If a .o file is compiled non-PIC then it should be forced
|
||||
# into the RW data segment with a mapfile option. This is done
|
||||
# with object files which generated from .s files.
|
||||
# The -ztext enforces that no relocations remain in the text segment
|
||||
# so that it remains purely read-only for optimum system performance.
|
||||
# Some libraries may use a smaller size (13bit -Kpic) on sparc instead of
|
||||
# (32 bit -KPIC) and will override GLOBAL_KPIC appropriately.
|
||||
#
|
||||
PIC_CODE_LARGE = -KPIC
|
||||
PIC_CODE_SMALL = -Kpic
|
||||
ifndef TCOV_BUILD
|
||||
GLOBAL_KPIC = $(PIC_CODE_LARGE)
|
||||
CXXFLAGS_COMMON += $(GLOBAL_KPIC)
|
||||
CFLAGS_COMMON += $(GLOBAL_KPIC)
|
||||
LDFLAGS_COMMON += -ztext
|
||||
endif # TCOV_BUILD
|
||||
|
||||
# If your platform has DPS, it will have Type1 fonts too, in which case
|
||||
# it is best to enable DPS support until such time as 2D's rasteriser
|
||||
# can fully handle Type1 fonts in all cases. Default is "yes".
|
||||
# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
|
||||
# DPS (Displayable PostScript) is available on Solaris machines
|
||||
|
||||
HAVE_DPS = yes
|
||||
|
||||
#
|
||||
# Japanese manpages
|
||||
#
|
||||
JA_SOURCE_ENCODING = eucJP
|
||||
JA_TARGET_ENCODINGS = eucJP UTF-8 PCK
|
||||
|
||||
|
@ -31,363 +31,7 @@
|
||||
# Get shared JDK settings
|
||||
include $(BUILDDIR)/common/shared/Defs.gmk
|
||||
|
||||
# CC compiler object code output directive flag value
|
||||
CC_OBJECT_OUTPUT_FLAG = -Fo
|
||||
CC_PROGRAM_OUTPUT_FLAG = -Fe
|
||||
|
||||
# The suffix applied to the library name for FDLIBM
|
||||
FDDLIBM_SUFFIX = lib
|
||||
# The suffix applied to scripts (.bat for windows, nothing for unix)
|
||||
SCRIPT_SUFFIX = .bat
|
||||
|
||||
HPIS = windows
|
||||
# LIB_LOCATION, which for windows identifies where .exe files go, may be
|
||||
# set by each GNUmakefile. The default is BINDIR.
|
||||
ifndef LIB_LOCATION
|
||||
LIB_LOCATION = $(BINDIR)
|
||||
endif # LIB_LOCATION
|
||||
|
||||
ifndef PLATFORM_SRC
|
||||
PLATFORM_SRC = $(TOPDIR)/src/windows
|
||||
endif # PLATFORM_SRC
|
||||
|
||||
# for backwards compatability, the old "win32" is used here instead of
|
||||
# the more proper "windows"
|
||||
PLATFORM_INCLUDE_NAME = win32
|
||||
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
|
||||
|
||||
# The following DLL's are considered MS runtime libraries and should
|
||||
# not to be REBASEd, see deploy/make/common/Release.gmk.
|
||||
# msvcrt.dll, msvcrnn.dll [msvcr71 or msvcr80 or msvcr90] : Microsoft runtimes
|
||||
MS_RUNTIME_LIBRARIES = msvcrt.dll
|
||||
MSVCRNN_DLL =
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
ifeq ($(COMPILER_VERSION), VS2003)
|
||||
MSVCRNN_DLL = msvcr71.dll
|
||||
MSVCPNN_DLL = msvcp71.dll
|
||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
||||
endif
|
||||
ifeq ($(COMPILER_VERSION), VS2005)
|
||||
MSVCRNN_DLL = msvcr80.dll
|
||||
MSVCPNN_DLL = msvcp80.dll
|
||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
||||
endif
|
||||
ifeq ($(COMPILER_VERSION), VS2008)
|
||||
MSVCRNN_DLL = msvcr90.dll
|
||||
MSVCPNN_DLL = msvcp90.dll
|
||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
||||
endif
|
||||
ifeq ($(COMPILER_VERSION), VS2010)
|
||||
MSVCRNN_DLL = msvcr100.dll
|
||||
MSVCPNN_DLL = msvcp100.dll
|
||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
||||
endif
|
||||
endif
|
||||
|
||||
# C Compiler flag definitions
|
||||
|
||||
#
|
||||
# Default optimization
|
||||
#
|
||||
ifeq ($(CC_VERSION),msvc)
|
||||
# Visual Studio .NET 2003 or VS2003 compiler option definitions:
|
||||
# -O1 Favors reduced size over speed (-Og -Os -Oy -Ob2 -Gs -GF -Gy)
|
||||
# -O2 Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy)
|
||||
# -Ox Full optimization (use -O2) (-Og -Oi -Ot -Oy -Ob2)
|
||||
# (Removed in Visual Studio 2005 or VS2005)
|
||||
# -Ob2 More aggressive inlining
|
||||
# -Og Global optimizations
|
||||
# -Oi Replace some functions with intrinsic or special forms
|
||||
# -Op Improve floating point calculations (disables some optimizations)
|
||||
# (Replaced with -fp:precise in VS2005, /Op is default now)
|
||||
# -Os Favor small code
|
||||
# -Ot Favor faster code
|
||||
# -Oy Frame pointer omission
|
||||
# -GB Optimize for pentium (old VC6 option?)
|
||||
# -G6 VS2003 version of -GB?
|
||||
# -GF Pool strings in read-only memory
|
||||
# -Gf Pool strings in read-write memory (the default)
|
||||
# -Gs Controls stack probess
|
||||
# -GS Adds buffer overflow checks on stacks
|
||||
# (Default in VS2005)
|
||||
# -GX Enables exception handling
|
||||
# (Replaced with /EHsc in VS2005)
|
||||
# -Gy Function level linking only
|
||||
#
|
||||
# NOTE: With VC6, -Ox included -Gs.
|
||||
# NOTE: With VC6, -Ox, -O1, and -O2 used -Ob1, not -Ob2.
|
||||
# NOTE: With VC6, -O1 and -O2 used -Gf, not -GF.
|
||||
#
|
||||
ifeq ($(COMPILER_VERSION), VC6)
|
||||
# VC6 (6.2) msvc compiler (the way Tiger and early Mustang were built)
|
||||
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
|
||||
AUTOMATIC_PCH_OPTION =
|
||||
GX_OPTION = -GX
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
CC_HIGHEST_OPT = -Ox -Gy -Os -GB
|
||||
CC_HIGHER_OPT = -Ox -Gy -Os -GB
|
||||
CC_LOWER_OPT = -Ox -Gy -Os -GB
|
||||
else
|
||||
CC_HIGHEST_OPT = -Ox -Gy -Op
|
||||
CC_HIGHER_OPT = -Ox -Gy -Op
|
||||
CC_LOWER_OPT = -Ox -Gy -Op
|
||||
endif
|
||||
endif
|
||||
ifeq ($(COMPILER_VERSION), VS2003)
|
||||
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
|
||||
AUTOMATIC_PCH_OPTION = -YX
|
||||
# Also known as VC7 compiler
|
||||
GX_OPTION = -GX
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
# Lowered opt level to try and reduce footprint, dll size especially.
|
||||
# Was: CC_HIGHEST_OPT = -O2 -G6
|
||||
# Was: CC_HIGHER_OPT = -O2
|
||||
CC_HIGHEST_OPT = -O2
|
||||
CC_HIGHER_OPT = -O1
|
||||
CC_LOWER_OPT = -O1
|
||||
else
|
||||
CC_HIGHEST_OPT = -O2 -Op
|
||||
CC_HIGHER_OPT = -O2 -Op
|
||||
CC_LOWER_OPT = -O1 -Op
|
||||
endif
|
||||
endif
|
||||
ifeq ($(COMPILER_VERSION), VS2005)
|
||||
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
|
||||
AUTOMATIC_PCH_OPTION =
|
||||
# VS2005 compiler, only with Platform SDK right now?
|
||||
GX_OPTION = -EHsc
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
CC_HIGHEST_OPT = -O2
|
||||
CC_HIGHER_OPT = -O1
|
||||
CC_LOWER_OPT = -O1
|
||||
else
|
||||
CC_HIGHEST_OPT = -O2
|
||||
CC_HIGHER_OPT = -O1
|
||||
CC_LOWER_OPT = -O1
|
||||
endif
|
||||
endif
|
||||
ifeq ($(COMPILER_VERSION), VS2008)
|
||||
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
|
||||
AUTOMATIC_PCH_OPTION =
|
||||
GX_OPTION = -EHsc
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
CC_HIGHEST_OPT = -O2
|
||||
CC_HIGHER_OPT = -O1
|
||||
CC_LOWER_OPT = -O1
|
||||
else
|
||||
CC_HIGHEST_OPT = -O2
|
||||
CC_HIGHER_OPT = -O1
|
||||
CC_LOWER_OPT = -O1
|
||||
endif
|
||||
endif
|
||||
ifeq ($(COMPILER_VERSION), VS2010)
|
||||
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
|
||||
AUTOMATIC_PCH_OPTION =
|
||||
GX_OPTION = -EHsc
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
CC_HIGHEST_OPT = -O2
|
||||
CC_HIGHER_OPT = -O1
|
||||
CC_LOWER_OPT = -O1
|
||||
else
|
||||
CC_HIGHEST_OPT = -O2
|
||||
CC_HIGHER_OPT = -O1
|
||||
CC_LOWER_OPT = -O1
|
||||
endif
|
||||
endif
|
||||
CC_NO_OPT = -Od
|
||||
else # CC_VERSION
|
||||
# GCC not supported, but left for historical reference...
|
||||
CC_HIGHEST_OPT = -O3
|
||||
CC_HIGHER_OPT = -O2
|
||||
CC_LOWER_OPT = -O2
|
||||
CC_NO_OPT =
|
||||
endif
|
||||
|
||||
# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off
|
||||
ifdef NO_OPTIMIZATIONS
|
||||
CC_HIGHEST_OPT = $(CC_NO_OPT)
|
||||
CC_HIGHER_OPT = $(CC_NO_OPT)
|
||||
CC_LOWER_OPT = $(CC_NO_OPT)
|
||||
endif
|
||||
|
||||
ifeq ($(PRODUCT), java)
|
||||
_OPT = $(CC_HIGHER_OPT)
|
||||
else
|
||||
_OPT = $(CC_LOWER_OPT)
|
||||
endif
|
||||
|
||||
# Select the runtime support library carefully, need to be consistent
|
||||
#
|
||||
# VS2003 compiler option definitions:
|
||||
# -MD Use dynamic multi-threaded runtime library
|
||||
# -MDd Use debug version (don't use, doesn't mix with -MD DLL's)
|
||||
# -MT Use static multi-threaded runtime library (-ML is going away)
|
||||
# -MTd Use static debug version (better than -MDd, no runtime issues)
|
||||
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
|
||||
#
|
||||
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
|
||||
#
|
||||
ifeq ($(MS_RUNTIME_STATIC),true)
|
||||
MS_RUNTIME_OPTION=-MT
|
||||
else
|
||||
MS_RUNTIME_OPTION=-MD
|
||||
endif
|
||||
# The _DEBUG macro option (changes things like malloc to use debug version)
|
||||
MS_RUNTIME_DEBUG_OPTION=
|
||||
MS_RC_DEBUG_OPTION=
|
||||
# Externally set environment variable can force any build to use the debug vers
|
||||
ifeq ($(MFC_DEBUG), true)
|
||||
ifeq ($(MS_RUNTIME_STATIC),true)
|
||||
MS_RUNTIME_OPTION=-MTd
|
||||
else
|
||||
# This MS debugging flag forces a dependence on the debug
|
||||
# version of the runtime library (MSVCRTD.DLL), as does -MDd.
|
||||
# We cannot re-distribute this debug runtime.
|
||||
MS_RUNTIME_OPTION=-MDd
|
||||
endif
|
||||
MS_RUNTIME_DEBUG_OPTION= -D_DEBUG
|
||||
MS_RC_DEBUG_OPTION= -d _DEBUG
|
||||
endif
|
||||
|
||||
# Always add _STATIC_CPPLIB definition
|
||||
STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
|
||||
MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
|
||||
|
||||
ifeq ($(CC_VERSION),msvc)
|
||||
# VS2003 compiler option definitions:
|
||||
# -Zi Cause *.pdb file to be created, full debug information
|
||||
# -Z7 Full debug inside the .obj, no .pdb
|
||||
# -Zd Basic debug, no local variables? In the .obj
|
||||
# -Zl Don't add runtime library name to obj file?
|
||||
# -Od Turns off optimization and speeds compilation
|
||||
# -YX -Fp/.../foobar.pch Use precompiled headers (try someday?)
|
||||
# -nologo Don't print out startup message
|
||||
# /D _STATIC_CPPLIB
|
||||
# Use static link for the C++ runtime (so msvcpnn.dll not needed)
|
||||
#
|
||||
CFLAGS_COMMON += -Zi -nologo
|
||||
CFLAGS_OPT = $(POPT)
|
||||
CFLAGS_DBG = -Od $(MS_RUNTIME_DEBUG_OPTION)
|
||||
|
||||
# Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type
|
||||
# by default. However, we expect the wchar_t to be a typedef to the
|
||||
# unsigned short data type. The -Zc:wchar_t- option restores the old
|
||||
# behavior (as seen in VS2003) to avoid massive code modifications.
|
||||
# When/if our code will be "C/C++ Standard"-compliant (at least in the area
|
||||
# of handling the wchar_t type), the option won't be necessary.
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
CFLAGS_VS2005 += -Zc:wchar_t-
|
||||
else
|
||||
# The 64bit Platform SDK we use (April 2005) doesn't like this option
|
||||
ifneq ($(CC_VER), 14.00.40310.41)
|
||||
CFLAGS_VS2005 += -Zc:wchar_t-
|
||||
endif
|
||||
endif
|
||||
|
||||
# All builds get the same runtime setting
|
||||
CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
|
||||
|
||||
|
||||
LDEBUG = /debug
|
||||
|
||||
ifeq ($(VTUNE_SUPPORT), true)
|
||||
OTHER_CFLAGS = -Z7 -Ox
|
||||
LDEBUG += /pdb:NONE
|
||||
endif
|
||||
|
||||
# The new Platform SDK and VS2005 has /GS as a default and requires
|
||||
# bufferoverflowU.lib on the link command line, otherwise
|
||||
# we get missing __security_check_cookie externals at link time.
|
||||
BUFFEROVERFLOWLIB = bufferoverflowU.lib
|
||||
# Always add bufferoverflowU.lib to VS2005 link commands (pack uses LDDFLAGS)
|
||||
LFLAGS_VS2005 = $(BUFFEROVERFLOWLIB)
|
||||
|
||||
# LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
|
||||
BASELFLAGS = -nologo /opt:REF /incremental:no
|
||||
LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION))
|
||||
LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION))
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# Preprocessor macro definitions
|
||||
#
|
||||
CPPFLAGS_COMMON = -DWIN32 -DIAL -D_LITTLE_ENDIAN
|
||||
ifeq ($(ARCH), amd64)
|
||||
CPPFLAGS_COMMON += -D_AMD64_ -Damd64
|
||||
else
|
||||
CPPFLAGS_COMMON += -DWIN32 -D_X86_ -Dx86
|
||||
endif
|
||||
CPPFLAGS_COMMON += -DWIN32_LEAN_AND_MEAN
|
||||
|
||||
#
|
||||
# Output options (use specific filenames to avoid parallel compile errors)
|
||||
#
|
||||
CFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map
|
||||
|
||||
#
|
||||
# Add warnings and extra on 64bit issues
|
||||
#
|
||||
ifeq ($(ARCH_DATA_MODEL), 64)
|
||||
CFLAGS_COMMON += -Wp64
|
||||
endif
|
||||
CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
|
||||
|
||||
#
|
||||
# Treat compiler warnings as errors, if requested
|
||||
#
|
||||
ifeq ($(COMPILER_WARNINGS_FATAL),true)
|
||||
CFLAGS_COMMON += -WX
|
||||
endif
|
||||
|
||||
CPPFLAGS_OPT =
|
||||
CPPFLAGS_DBG = -DDEBUG -DLOGGING
|
||||
|
||||
CXXFLAGS_COMMON = $(CFLAGS_COMMON)
|
||||
CXXFLAGS_OPT = $(CFLAGS_OPT)
|
||||
CXXFLAGS_DBG = $(CFLAGS_DBG)
|
||||
|
||||
ifneq ($(LIBRARY),fdlibm)
|
||||
EXTRA_LIBS += advapi32.lib
|
||||
endif
|
||||
|
||||
#
|
||||
# Path and option to link against the VM, if you have to.
|
||||
#
|
||||
JVMLIB = $(BOOTDIR)/lib/jvm.lib
|
||||
JAVALIB =
|
||||
|
||||
ifeq ($(CC_VERSION), msvc)
|
||||
CC_DEPEND = -FD
|
||||
CC_DEPEND_FILTER =
|
||||
else # CC_VERSION
|
||||
# not supported, but left for historical reference...
|
||||
CC_DEPEND = -MM
|
||||
CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)&!g'
|
||||
endif # CC_VERSION
|
||||
|
||||
LIBRARY_SUFFIX = dll
|
||||
LIB_SUFFIX = lib
|
||||
|
||||
# Settings for the VERSIONINFO tap on windows.
|
||||
VERSIONINFO_RESOURCE = $(TOPDIR)/src/windows/resource/version.rc
|
||||
|
||||
RC_FLAGS = /l 0x409 /r
|
||||
|
||||
ifeq ($(VARIANT), OPT)
|
||||
RC_FLAGS += -d NDEBUG
|
||||
else
|
||||
RC_FLAGS += $(MS_RC_DEBUG_OPTION)
|
||||
endif
|
||||
|
||||
ifndef COPYRIGHT_YEAR
|
||||
COPYRIGHT_YEAR = 2007
|
||||
endif
|
||||
|
||||
RC_FLAGS += -d "JDK_BUILD_ID=$(FULL_VERSION)" \
|
||||
-d "JDK_COMPANY=$(COMPANY_NAME)" \
|
||||
-d "JDK_COMPONENT=$(PRODUCT_NAME) Platform SE binary" \
|
||||
-d "JDK_VER=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)" \
|
||||
-d "JDK_COPYRIGHT=Copyright \xA9 $(COPYRIGHT_YEAR)" \
|
||||
-d "JDK_NAME=$(PRODUCT_NAME) Platform SE $(JDK_MINOR_VERSION) $(JDK_UPDATE_META_TAG)" \
|
||||
-d "JDK_FVER=$(JDK_VERSION)"
|
||||
|
@ -73,54 +73,10 @@ JDK_LOCALES = ja zh_CN
|
||||
#
|
||||
JRE_NONEXIST_LOCALES = en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
|
||||
|
||||
#
|
||||
# All libraries except libjava and libjvm itself link against libjvm and
|
||||
# libjava, the latter for its exported common utilities. libjava only links
|
||||
# against libjvm. Programs' makefiles take their own responsibility for
|
||||
# adding other libs.
|
||||
#
|
||||
ifdef PACKAGE
|
||||
# put JAVALIB first, but do not lose any platform specific values....
|
||||
LDLIBS_COMMON = $(JAVALIB)
|
||||
endif # PACKAGE
|
||||
|
||||
#
|
||||
# Libraries that must appear ahead of libc.so on the link command line
|
||||
#
|
||||
ifdef PROGRAM
|
||||
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
LDLIBS_COMMON = -lthread -ldl
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), linux)
|
||||
LDLIBS_COMMON = -ldl
|
||||
endif
|
||||
|
||||
endif # PROGRAM
|
||||
|
||||
LDLIBS_COMMON += $(EXTRA_LIBS)
|
||||
|
||||
#
|
||||
# Default is to build, not import native binaries
|
||||
#
|
||||
ifndef IMPORT_NATIVE_BINARIES
|
||||
IMPORT_NATIVE_BINARIES=false
|
||||
endif
|
||||
# If importing libraries in, no incremental builds
|
||||
ifeq ($(IMPORT_NATIVE_BINARIES),true)
|
||||
INCREMENTAL_BUILD=false
|
||||
endif
|
||||
|
||||
# for generated libraries
|
||||
LIBDIR = $(OUTPUTDIR)/lib
|
||||
ABS_LIBDIR = $(ABS_OUTPUTDIR)/lib
|
||||
# Optional place to save the windows .lib files
|
||||
LIBFILES_DIR = $(OUTPUTDIR)/libfiles
|
||||
# for ext jre files
|
||||
EXTDIR = $(LIBDIR)/ext
|
||||
# for generated include files
|
||||
INCLUDEDIR = $(OUTPUTDIR)/include
|
||||
# for generated class files
|
||||
CLASSBINDIR = $(OUTPUTDIR)/classes
|
||||
DEMOCLASSDIR = $(OUTPUTDIR)/democlasses
|
||||
@ -131,8 +87,6 @@ BUILDTOOLJARDIR = $(OUTPUTDIR)/btjars
|
||||
ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars
|
||||
# for generated java source files
|
||||
GENSRCDIR = $(OUTPUTDIR)/gensrc
|
||||
# for generated C source files (not javah)
|
||||
GENNATIVESRCDIR = $(OUTPUTDIR)/gennativesrc
|
||||
# for imported source files
|
||||
IMPORTSRCDIR = $(OUTPUTDIR)/impsrc
|
||||
# for imported documents
|
||||
@ -196,19 +150,6 @@ override ABS_TEMPDIR = $(ABS_OUTPUTDIR)/$(UNIQUE_PATH)
|
||||
dummy1:=$(shell $(MKDIR) -p $(TEMPDIR))
|
||||
dummy2:=$(shell $(MKDIR) -p $(TEMP_DISK))
|
||||
|
||||
# OBJDIRNAME is the name of the directory where the object code is to
|
||||
# be placed. It's name depends on whether the data model architecture
|
||||
# is 32-bit or not.
|
||||
ifneq ($(ARCH_DATA_MODEL), 32)
|
||||
OBJDIRNAME = obj$(ARCH_DATA_MODEL)$(OBJDIRNAME_SUFFIX)
|
||||
else
|
||||
OBJDIRNAME = obj$(OBJDIRNAME_SUFFIX)
|
||||
endif
|
||||
OBJDIR = $(TEMPDIR)/$(OBJDIRNAME)
|
||||
|
||||
# CLASSHDRDIR is where the generated C Class Header files go.
|
||||
CLASSHDRDIR = $(TEMPDIR)/CClassHeaders
|
||||
|
||||
#
|
||||
# CLASSDESTDIR can be used to specify the directory where generated classes
|
||||
# are to be placed. The default is CLASSBINDIR.
|
||||
@ -217,11 +158,6 @@ ifndef CLASSDESTDIR
|
||||
CLASSDESTDIR = $(CLASSBINDIR)
|
||||
endif
|
||||
|
||||
INCLUDES = -I. -I$(CLASSHDRDIR) \
|
||||
$(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES)
|
||||
OTHER_CPPFLAGS = $(INCLUDES)
|
||||
|
||||
|
||||
#
|
||||
# vpaths. These are the default locations searched for source files.
|
||||
# GNUmakefiles of individual areas often override the default settings.
|
||||
@ -235,35 +171,6 @@ VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPA
|
||||
VPATH.java = $(VPATH0.java)
|
||||
vpath %.java $(VPATH.java)
|
||||
vpath %.class $(CLASSBINDIR)
|
||||
vpath %.$(OBJECT_SUFFIX) $(OBJDIR)
|
||||
|
||||
#
|
||||
# VPATH.h is used elsewhere to generate include flags. By default,
|
||||
# anyone has access to the include files that the JVM area exports,
|
||||
# namely jni.h, jvm.h, and jni_utils.h, plus their platform-specific
|
||||
# relatives.
|
||||
#
|
||||
ifeq ($(PLATFORM), windows)
|
||||
VPATH.h = $(BOOTDIR)/include;$(BOOTDIR)/include/$(PLATFORM_INCLUDE_NAME)
|
||||
else
|
||||
VPATH.h = $(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/include$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/javavm/include
|
||||
endif
|
||||
vpath %.h $(VPATH.h)
|
||||
|
||||
#
|
||||
# Used in two ways: helps link against libjava.so. Also if overridden
|
||||
# determines where your shared library is installed.
|
||||
#
|
||||
ifndef LIB_LOCATION
|
||||
LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
|
||||
endif
|
||||
|
||||
#
|
||||
# Java header and stub variables
|
||||
#
|
||||
CLASSHDRS = $(patsubst %,$(CLASSHDRDIR)/%.h,$(subst .,_,$(CLASSES.export)))
|
||||
CLASSSTUBOBJS = classstubs.$(OBJECT_SUFFIX)
|
||||
STUBPREAMBLE = $(INCLUDEDIR)/StubPreamble.h
|
||||
|
||||
#
|
||||
# Classpath seen by javac (different from the one seen by the VM
|
||||
@ -338,38 +245,9 @@ define OTHERSUBDIRS-loop
|
||||
done
|
||||
endef
|
||||
|
||||
#
|
||||
# Create BYFILE OPT and DBG settings, if CFLAGS_OPT/foobar.o is set then it is
|
||||
# used for this file, otherwise the default settings are used.
|
||||
#
|
||||
CFLAGS_$(VARIANT)/BYFILE = $(CFLAGS_$(VARIANT)/$(@F)) \
|
||||
$(CFLAGS_$(VARIANT)$(CFLAGS_$(VARIANT)/$(@F)))
|
||||
CXXFLAGS_$(VARIANT)/BYFILE = $(CXXFLAGS_$(VARIANT)/$(@F)) \
|
||||
$(CXXFLAGS_$(VARIANT)$(CXXFLAGS_$(VARIANT)/$(@F)))
|
||||
|
||||
#
|
||||
# Tool flags
|
||||
#
|
||||
ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
|
||||
CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS)
|
||||
CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS)
|
||||
CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
|
||||
$(DEFINES) $(OPTIONS:%=-D%)
|
||||
LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
|
||||
LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
|
||||
LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
|
||||
$(OTHER_LINTFLAGS)
|
||||
|
||||
# this should be moved into Defs-<platform>.gmk.....
|
||||
ifeq ($(PLATFORM), windows)
|
||||
VERSION_DEFINES = -DRELEASE="\"$(RELEASE)\""
|
||||
else
|
||||
VERSION_DEFINES = -DRELEASE='"$(RELEASE)"'
|
||||
endif
|
||||
|
||||
# Prevent the use of many default suffix rules we do not need
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .h .obj .cpp .hpp .java .class
|
||||
.SUFFIXES: .java .class
|
||||
|
||||
# Make sure we are all insane
|
||||
ifdef INSANE
|
||||
|
@ -1,275 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 1995, 2009, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Generic makefile for building shared libraries.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/make/common/Classes.gmk
|
||||
|
||||
#
|
||||
# It is important to define these *after* including Classes.gmk
|
||||
# in order to override the values defined inthat makefile.
|
||||
#
|
||||
|
||||
ACTUAL_LIBRARY_NAME = $(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
|
||||
ACTUAL_LIBRARY_DIR = $(LIB_LOCATION)
|
||||
ACTUAL_LIBRARY = $(ACTUAL_LIBRARY_DIR)/$(ACTUAL_LIBRARY_NAME)
|
||||
|
||||
library:: $(ACTUAL_LIBRARY)
|
||||
|
||||
FILES_o = $(patsubst %.c, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c))))
|
||||
FILES_o += $(patsubst %.s, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_s))))
|
||||
FILES_o += $(patsubst %.cpp, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_cpp))))
|
||||
|
||||
ifeq ($(INCREMENTAL_BUILD),true)
|
||||
FILES_d = $(patsubst %.c, %.$(DEPEND_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c))))
|
||||
FILES_d += $(patsubst %.cpp, %.$(DEPEND_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_cpp))))
|
||||
endif # INCREMENTAL_BUILD
|
||||
|
||||
ifeq ($(PLATFORM),solaris)
|
||||
# List of all lint files, one for each .c file (only for C)
|
||||
FILES_ln = $(patsubst %.c, %.$(LINT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c))))
|
||||
endif
|
||||
|
||||
#
|
||||
# C++ libraries must be linked with CC.
|
||||
#
|
||||
ifdef CPLUSPLUSLIBRARY
|
||||
LINKER=$(LINK.cc)
|
||||
else
|
||||
LINKER=$(LINK.c)
|
||||
endif
|
||||
|
||||
# We either need to import (copy) libraries in, or build them
|
||||
$(ACTUAL_LIBRARY):: $(INIT) $(TEMPDIR) $(LIBDIR) $(BINDIR) $(EXTDIR) classheaders
|
||||
|
||||
#
|
||||
# COMPILE_APPROACH: Different approaches to compile up the native object
|
||||
# files as quickly as possible.
|
||||
# The setting of parallel works best on Unix, batch on Windows.
|
||||
#
|
||||
|
||||
COMPILE_FILES_o = $(OBJDIR)/.files_compiled
|
||||
$(COMPILE_FILES_o): $(FILES_d) $(FILES_o)
|
||||
@$(ECHO) "$<" >> $@
|
||||
clean::
|
||||
$(RM) $(COMPILE_FILES_o)
|
||||
|
||||
#
|
||||
# COMPILE_APPROACH=parallel: Will trigger compilations (just compilations) to
|
||||
# happen in parallel. Greatly decreases Unix build time, even on single CPU
|
||||
# machines, more so on multiple CPU machines. Default is 2 compiles
|
||||
# at a time, but can be adjusted with ALT_PARALLEL_COMPILE_JOBS.
|
||||
# Note that each .d file will also be dependent on it's .o file, see
|
||||
# Rules.gmk.
|
||||
# Note this does not depend on Rules.gmk to work like batch (below)
|
||||
# and this technique doesn't seem to help Windows build time nor does
|
||||
# it work very well, it's possible the Windows Visual Studio compilers
|
||||
# don't work well in a parallel situation, this needs investigation.
|
||||
#
|
||||
|
||||
ifeq ($(COMPILE_APPROACH),parallel)
|
||||
|
||||
.PHONY: library_parallel_compile
|
||||
|
||||
library_parallel_compile:
|
||||
@$(ECHO) "Begin parallel compiles: $(shell $(PWD))"
|
||||
@$(MAKE) -j $(PARALLEL_COMPILE_JOBS) $(COMPILE_FILES_o)
|
||||
@$(ECHO) "Done with parallel compiles: $(shell $(PWD))"
|
||||
|
||||
$(ACTUAL_LIBRARY):: library_parallel_compile
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# COMPILE_APPROACH=batch: Will trigger compilations (just compilations) to
|
||||
# happen in batch mode. Greatly decreases Windows build time.
|
||||
# See logic in Rules.gmk for how compiles happen, the $(MAKE) in
|
||||
# library_batch_compile below triggers the actions in Rules.gmk.
|
||||
# Note that each .d file will also be dependent on it's .o file, see
|
||||
# Rules.gmk.
|
||||
#
|
||||
ifeq ($(COMPILE_APPROACH),batch)
|
||||
|
||||
.PHONY: library_batch_compile
|
||||
|
||||
library_batch_compile:
|
||||
@$(ECHO) "Begin BATCH compiles: $(shell $(PWD))"
|
||||
$(MAKE) $(COMPILE_FILES_o)
|
||||
$(MAKE) batch_compile
|
||||
@$(ECHO) "Done with BATCH compiles: $(shell $(PWD))"
|
||||
$(MAKE) COMPILE_APPROACH=normal $(COMPILE_FILES_o)
|
||||
|
||||
$(ACTUAL_LIBRARY):: library_batch_compile
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), windows)
|
||||
|
||||
#
|
||||
# Library building rules.
|
||||
#
|
||||
|
||||
$(LIBRARY).lib:: $(OBJDIR)
|
||||
|
||||
# build it into $(OBJDIR) so that the other generated files get put
|
||||
# there, then copy just the DLL (and MAP file) to the requested directory.
|
||||
#
|
||||
$(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf
|
||||
@$(prep-target)
|
||||
@$(MKDIR) -p $(OBJDIR)
|
||||
$(LINK) -dll -out:$(OBJDIR)/$(@F) \
|
||||
-map:$(OBJDIR)/$(LIBRARY).map \
|
||||
$(LFLAGS) @$(OBJDIR)/$(LIBRARY).lcf \
|
||||
$(OTHER_LCF) $(JAVALIB) $(LDLIBS)
|
||||
$(CP) $(OBJDIR)/$(@F) $@
|
||||
$(CP) $(OBJDIR)/$(LIBRARY).map $(@D)
|
||||
$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D)
|
||||
|
||||
$(OBJDIR)/$(LIBRARY).lcf: $(OBJDIR)/$(LIBRARY).res $(COMPILE_FILES_o) $(FILES_m)
|
||||
@$(prep-target)
|
||||
@$(MKDIR) -p $(TEMPDIR)
|
||||
@$(ECHO) $(FILES_o) > $@
|
||||
ifndef LOCAL_RESOURCE_FILE
|
||||
@$(ECHO) $(OBJDIR)/$(LIBRARY).res >> $@
|
||||
endif
|
||||
@$(ECHO) Created $@
|
||||
|
||||
RC_FLAGS += /D "JDK_FNAME=$(LIBRARY).dll" \
|
||||
/D "JDK_INTERNAL_NAME=$(LIBRARY)" \
|
||||
/D "JDK_FTYPE=0x2L"
|
||||
|
||||
$(OBJDIR)/$(LIBRARY).res: $(VERSIONINFO_RESOURCE)
|
||||
ifndef LOCAL_RESOURCE_FILE
|
||||
@$(prep-target)
|
||||
$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(@) $(VERSIONINFO_RESOURCE)
|
||||
endif
|
||||
|
||||
#
|
||||
# Install a .lib file if required.
|
||||
#
|
||||
ifeq ($(INSTALL_DOT_LIB), true)
|
||||
$(ACTUAL_LIBRARY):: $(LIBDIR)/$(LIBRARY).lib
|
||||
|
||||
clean::
|
||||
-$(RM) $(LIBDIR)/$(LIBRARY).lib
|
||||
|
||||
$(LIBDIR)/$(LIBRARY).lib:: $(OBJDIR)/$(LIBRARY).lib
|
||||
$(install-file)
|
||||
|
||||
$(LIBDIR)/$(LIBRARY).dll:: $(OBJDIR)/$(LIBRARY).dll
|
||||
$(install-file)
|
||||
|
||||
endif # INSTALL_DOT_LIB
|
||||
|
||||
else # PLATFORM
|
||||
|
||||
#
|
||||
# On Solaris, use mcs to write the version into the comment section of
|
||||
# the shared library. On other platforms set this to false at the
|
||||
# make command line.
|
||||
#
|
||||
$(ACTUAL_LIBRARY):: $(COMPILE_FILES_o) $(FILES_m) $(FILES_reorder)
|
||||
@$(prep-target)
|
||||
@$(ECHO) "STATS: LIBRARY=$(LIBRARY), PRODUCT=$(PRODUCT), _OPT=$(_OPT)"
|
||||
@$(ECHO) "Rebuilding $@ because of $?"
|
||||
$(LINKER) $(SHARED_LIBRARY_FLAG) -o $@ $(FILES_o) $(LDLIBS)
|
||||
ifeq ($(WRITE_LIBVERSION),true)
|
||||
$(MCS) -d -a "$(FULL_VERSION)" $@
|
||||
endif # WRITE_LIBVERSION
|
||||
|
||||
endif # PLATFORM
|
||||
|
||||
#
|
||||
# Cross check all linted files against each other
|
||||
#
|
||||
ifeq ($(PLATFORM),solaris)
|
||||
lint.errors : $(FILES_ln)
|
||||
$(LINT.c) $(FILES_ln) $(LDLIBS)
|
||||
endif
|
||||
|
||||
#
|
||||
# Class libraries with JNI native methods get a include to the package.
|
||||
#
|
||||
ifdef PACKAGE
|
||||
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)
|
||||
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)
|
||||
OTHER_INCLUDES += -I$(SHARE_SRC)/native/common -I$(PLATFORM_SRC)/native/common
|
||||
OTHER_INCLUDES += -I$(SHARE_SRC)/native/$(PKGDIR) \
|
||||
-I$(PLATFORM_SRC)/native/$(PKGDIR)
|
||||
endif
|
||||
|
||||
#
|
||||
# Clean/clobber rules
|
||||
#
|
||||
clean::
|
||||
$(RM) -r $(ACTUAL_LIBRARY)
|
||||
|
||||
clobber:: clean
|
||||
|
||||
#
|
||||
# INCREMENTAL_BUILD means that this workspace will be built over and over
|
||||
# possibly incrementally. This means tracking the object file dependencies
|
||||
# on include files so that sources get re-compiled when the include files
|
||||
# change. When building from scratch and doing a one time build (like
|
||||
# release engineering or nightly builds) set INCREMENTAL_BUILD=false.
|
||||
#
|
||||
|
||||
ifeq ($(INCREMENTAL_BUILD),true)
|
||||
|
||||
#
|
||||
# Workaround: gnumake sometimes says files is empty when it shouldn't
|
||||
# was: files := $(foreach file, $(wildcard $(OBJDIR)/*.$(DEPEND_SUFFIX)), $(file))
|
||||
#
|
||||
files := $(shell $(LS) $(OBJDIR)/*.$(DEPEND_SUFFIX) 2>/dev/null)
|
||||
|
||||
#
|
||||
# Only include these files if we have any.
|
||||
#
|
||||
ifneq ($(strip $(files)),)
|
||||
|
||||
include $(files)
|
||||
|
||||
endif # files
|
||||
|
||||
endif # INCREMENTAL_BUILD
|
||||
|
||||
#
|
||||
# Default dependencies
|
||||
#
|
||||
|
||||
all: build
|
||||
|
||||
build: library
|
||||
|
||||
debug:
|
||||
$(MAKE) VARIANT=DBG build
|
||||
|
||||
fastdebug:
|
||||
$(MAKE) VARIANT=DBG FASTDEBUG=true build
|
||||
|
||||
.PHONY: all build debug fastdebug
|
||||
|
@ -1,98 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 1998, 2005, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Makefile for linking with mapfiles.
|
||||
#
|
||||
# NOTE: Not using a mapfile will expose all your extern functions and
|
||||
# extern data symbols as part of your interface, so unless your
|
||||
# extern names are safe from being mistaken as names from other
|
||||
# libraries, you better use a mapfile, or use a unique naming
|
||||
# convention on all your extern symbols.
|
||||
#
|
||||
# The mapfile will establish versioning by defining the exported interface.
|
||||
#
|
||||
# The mapfile can also force certain .o files or elf sections into the
|
||||
# the different segments of the resulting library/program image.
|
||||
#
|
||||
# The macro FILES_m can contain any number of mapfiles.
|
||||
#
|
||||
|
||||
# Always make sure 'all' is the default rule
|
||||
mapfile_default_rule: all
|
||||
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
|
||||
ifeq ($(VARIANT), OPT)
|
||||
# OPT build MUST have a mapfile?
|
||||
ifndef FILES_m
|
||||
FILES_m = mapfile-vers
|
||||
endif
|
||||
|
||||
# If we are re-ordering functions in this solaris library, we need to make
|
||||
# sure that -xF is added to the compile lines. This option is critical and
|
||||
# enables the functions to be reordered.
|
||||
ifdef FILES_reorder
|
||||
CFLAGS_OPT += -xF
|
||||
CXXFLAGS_OPT += -xF
|
||||
endif
|
||||
|
||||
INIT += $(TEMPDIR)/mapfile-vers
|
||||
|
||||
$(TEMPDIR)/mapfile-vers : $(FILES_m) $(FILES_reorder)
|
||||
$(prep-target)
|
||||
$(CAT) $(FILES_m) > $@
|
||||
ifdef FILES_reorder
|
||||
$(SED) -e 's=OUTPUTDIR=$(OUTPUTDIR)=' $(FILES_reorder) >> $@
|
||||
endif
|
||||
endif # VARIANT
|
||||
|
||||
ifndef LDNOMAP
|
||||
LDMAPFLAGS_OPT = -M$(TEMPDIR)/mapfile-vers
|
||||
LDMAPFLAGS_DBG = $(FILES_m:%=-M%)
|
||||
endif
|
||||
|
||||
endif # PLATFORM
|
||||
|
||||
|
||||
ifeq ($(PLATFORM), linux)
|
||||
|
||||
ifeq ($(VARIANT), OPT)
|
||||
# OPT build MUST have a mapfile?
|
||||
ifndef FILES_m
|
||||
FILES_m = mapfile-vers
|
||||
endif
|
||||
endif # VARIANT
|
||||
|
||||
ifndef LDNOMAP
|
||||
LDMAPFLAGS_OPT = $(FILES_m:%=-Xlinker -version-script=%)
|
||||
LDMAPFLAGS_DBG = $(FILES_m:%=-Xlinker -version-script=%)
|
||||
endif
|
||||
|
||||
endif # PLATFORM
|
||||
|
||||
LDFLAGS_OPT += $(LDMAPFLAGS_OPT)
|
||||
LDFLAGS_DBG += $(LDMAPFLAGS_DBG)
|
||||
|
@ -34,7 +34,7 @@ rules_default_rule: all
|
||||
#
|
||||
# Directory set up. (Needed by deploy workspace)
|
||||
#
|
||||
$(CLASSDESTDIR) $(CLASSHDRDIR) $(OBJDIR) $(OUTPUTDIR) $(BINDIR) $(LIBDIR) $(LIBDIR)/$(LIBARCH) $(TEMPDIR) $(EXTDIR):
|
||||
$(CLASSDESTDIR) $(OUTPUTDIR) $(TEMPDIR) $(EXTDIR):
|
||||
$(MKDIR) -p $@
|
||||
|
||||
#
|
||||
@ -163,9 +163,6 @@ $(CLASSDESTDIR)/%.class: $(SHARE_SRC)/classes/%.java
|
||||
# List of class files needed
|
||||
FILES_class = $(FILES_java:%.java=$(CLASSDESTDIR)/%.class)
|
||||
|
||||
# Got to include exported files.
|
||||
FILES_class += $(FILES_export:%.java=$(CLASSDESTDIR)/%.class)
|
||||
|
||||
# Construct list of java sources we need to compile
|
||||
source_list_prime:
|
||||
@$(MKDIR) -p $(TEMPDIR)
|
||||
@ -214,50 +211,7 @@ endif
|
||||
classes.clean: packages.clean
|
||||
$(RM) $(JAVA_SOURCE_LIST)
|
||||
|
||||
#
|
||||
# C and C++ make dependencies
|
||||
#
|
||||
include $(TOPDIR)/make/common/internal/NativeCompileRules.gmk
|
||||
|
||||
#
|
||||
# Running Javah to generate stuff into CClassHeaders.
|
||||
#
|
||||
|
||||
ifdef FILES_export
|
||||
|
||||
CLASSES.export = $(subst /,.,$(FILES_export:%.java=%))
|
||||
CLASSES.export += $(subst /,.,$(FILES_export2:%.java=%))
|
||||
CLASSES.export += $(subst /,.,$(FILES_export3:%.java=%))
|
||||
CLASSES_export = $(FILES_export:%.java=$(CLASSDESTDIR)/%.class)
|
||||
CLASSES_export += $(FILES_export2:%.java=$(CLASSDESTDIR)/%.class)
|
||||
CLASSES_export += $(FILES_export3:%.java=$(CLASSDESTDIR)/%.class)
|
||||
|
||||
# Fix when deploy workspace makefiles don't depend on this name
|
||||
#CLASSHDR_DOTFILE=$(CLASSHDRDIR)/.classheaders
|
||||
|
||||
CLASSHDR_DOTFILE=$(OBJDIR)/.class.headers.$(ARCH)
|
||||
|
||||
classheaders: classes $(CLASSHDR_DOTFILE)
|
||||
|
||||
$(CLASSHDR_DOTFILE): $(CLASSES_export)
|
||||
$(prep-target)
|
||||
$(JAVAH_CMD) -d $(CLASSHDRDIR)/ \
|
||||
$(CLASSES.export) $(subst $$,\$$,$(EXPORTED_inner))
|
||||
@$(java-vm-cleanup)
|
||||
@$(TOUCH) $@
|
||||
|
||||
classheaders.clean:
|
||||
$(RM) -r $(CLASSHDRDIR) $(CLASSHDR_DOTFILE)
|
||||
|
||||
else # FILES_export
|
||||
|
||||
classheaders: classes
|
||||
|
||||
classheaders.clean:
|
||||
|
||||
endif # FILES_export
|
||||
|
||||
clean clobber:: classheaders.clean classes.clean .delete.classlist
|
||||
clean clobber:: classes.clean .delete.classlist
|
||||
|
||||
#
|
||||
# Default dependencies
|
||||
@ -265,12 +219,11 @@ clean clobber:: classheaders.clean classes.clean .delete.classlist
|
||||
|
||||
all: build
|
||||
|
||||
build: classheaders
|
||||
build: classes
|
||||
|
||||
default: all
|
||||
|
||||
.PHONY: all build clean clobber \
|
||||
.delete.classlist classes .compile.classlist classes.clean \
|
||||
classheaders classheaders.clean \
|
||||
batch_compile
|
||||
|
||||
|
@ -1,214 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 1995, 2007, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Native C/C++ Compile Rules
|
||||
#
|
||||
|
||||
#
|
||||
# INCREMENTAL_BUILD: Record the #include file dependencies.
|
||||
#
|
||||
# NOTE: We build make include files with the suffix
|
||||
# $(DEPEND_SUFFIX) on every compilation. These are initially
|
||||
# created as temp files just in case a ^C kills it in the middle.
|
||||
# Compiler is smart enough to handle ^C and not create the .o file, or
|
||||
# is supposed to be that smart, but the .$(DEPEND_SUFFIX) file
|
||||
# creation here isn't.
|
||||
# These .$(DEPEND_SUFFIX) files are included by Library.gmk and
|
||||
# Program.gmk, when they exist (Search for 'make dependencies').
|
||||
#
|
||||
|
||||
ifeq ($(INCREMENTAL_BUILD),true)
|
||||
|
||||
$(OBJDIR)/%.$(DEPEND_SUFFIX): %.c
|
||||
@$(prep-target)
|
||||
@$(ECHO) "Creating $@"
|
||||
@$(RM) $@.temp
|
||||
@$(CC) $(CC_DEPEND) $(CPPFLAGS) $< 2> $(DEV_NULL) | \
|
||||
$(CC_DEPEND_FILTER) > $@.temp
|
||||
@$(MV) $@.temp $@
|
||||
|
||||
$(OBJDIR)/%.$(DEPEND_SUFFIX): %.cpp
|
||||
@$(prep-target)
|
||||
@$(ECHO) "Creating $@"
|
||||
@$(RM) $@.temp
|
||||
@$(CXX) $(CC_DEPEND) $(CPPFLAGS) $(CXXFLAGS) $< 2> $(DEV_NULL) | \
|
||||
$(CC_DEPEND_FILTER) > $@.temp
|
||||
@$(MV) $@.temp $@
|
||||
|
||||
endif # INCREMENTAL_BUILD
|
||||
|
||||
#
|
||||
# C, C++, asm files.
|
||||
#
|
||||
# Normal or parallel compile rule is the same, but batch compiles require
|
||||
# we save up the sources files that use the same compile line so that we
|
||||
# can do one compile line.
|
||||
#
|
||||
|
||||
ifneq ($(COMPILE_APPROACH), batch)
|
||||
|
||||
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.c
|
||||
@$(prep-target)
|
||||
$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
|
||||
@$(check-conventions)
|
||||
|
||||
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.cpp
|
||||
@$(prep-target)
|
||||
$(COMPILE.cc) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
|
||||
@$(check-conventions)
|
||||
|
||||
else
|
||||
|
||||
#
|
||||
# Batch compiling might be faster if the compiler was smart about recognizing
|
||||
# optimization opportunities available when all files are being compiled
|
||||
# the same way. Unfortunately this is rare.
|
||||
# Automatic pre-compiled headers (pch) might be a possibility so we
|
||||
# add any auto pch options here.
|
||||
# So we save all the source files that have the same compile line as the
|
||||
# first file. A normal compile pass is made after the batch compile
|
||||
# to catch anything missed.
|
||||
# If the compilers had a -o option that allowed us to direct where to
|
||||
# write the object files to, then we would not need to save the object
|
||||
# file list or move them from the make directory to the build directory.
|
||||
#
|
||||
|
||||
# Source names
|
||||
COMPILE_LIST.c = $(OBJDIR)/.source_names_c
|
||||
COMPILE_LIST.cpp = $(OBJDIR)/.source_names_cpp
|
||||
|
||||
# Object file list
|
||||
COMPILE_OBJ_LIST.c = $(OBJDIR)/.obj_names_c
|
||||
COMPILE_OBJ_LIST.cpp = $(OBJDIR)/.obj_names_cpp
|
||||
|
||||
# The compile line
|
||||
COMPILE_BATCH.c = $(OBJDIR)/.compile_c
|
||||
COMPILE_BATCH.cpp = $(OBJDIR)/.compile_cpp
|
||||
|
||||
# The compile line for the current target
|
||||
THIS_COMPILE_BATCH.c = $(COMPILE_BATCH.c)-$(@F)
|
||||
THIS_COMPILE_BATCH.cpp = $(COMPILE_BATCH.cpp)-$(@F)
|
||||
|
||||
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.c
|
||||
@$(prep-target)
|
||||
@$(ECHO) "$(COMPILE.c) $(CFLAGS_GPROF)" > $(THIS_COMPILE_BATCH.c)
|
||||
@if [ ! -s $(COMPILE_BATCH.c) ] ; then \
|
||||
$(CP) $(THIS_COMPILE_BATCH.c) $(COMPILE_BATCH.c) ; \
|
||||
$(ECHO) $< > $(COMPILE_LIST.c); \
|
||||
$(ECHO) $(@F) > $(COMPILE_OBJ_LIST.c); \
|
||||
elif [ "`$(DIFF) -w -b $(THIS_COMPILE_BATCH.c) $(COMPILE_BATCH.c)`" \
|
||||
= "" ] ; then \
|
||||
$(ECHO) $< >> $(COMPILE_LIST.c); \
|
||||
$(ECHO) $(@F) >> $(COMPILE_OBJ_LIST.c); \
|
||||
fi
|
||||
@$(RM) $(THIS_COMPILE_BATCH.c)
|
||||
@$(check-conventions)
|
||||
|
||||
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.cpp
|
||||
@$(prep-target)
|
||||
@$(ECHO) "$(COMPILE.cpp) $(CFLAGS_GPROF)" > $(THIS_COMPILE_BATCH.cpp)
|
||||
@if [ ! -s $(COMPILE_BATCH.cpp) ] ; then \
|
||||
$(CP) $(THIS_COMPILE_BATCH.cpp) $(COMPILE_BATCH.cpp) ; \
|
||||
$(ECHO) $< > $(COMPILE_LIST.cpp); \
|
||||
$(ECHO) $(@F) > $(COMPILE_OBJ_LIST.cpp); \
|
||||
elif [ "`$(DIFF) -w -b $(THIS_COMPILE_BATCH.cpp) $(COMPILE_BATCH.cpp)`"\
|
||||
= "" ] ; then \
|
||||
$(ECHO) $< >> $(COMPILE_LIST.cpp); \
|
||||
$(ECHO) $(@F) >> $(COMPILE_OBJ_LIST.cpp); \
|
||||
fi
|
||||
@$(RM) $(THIS_COMPILE_BATCH.cpp)
|
||||
@$(check-conventions)
|
||||
|
||||
batch_compile: $(FILES_o)
|
||||
@$(ECHO) "Doing batch compilations"
|
||||
@if [ -s $(COMPILE_LIST.c) ] ; then \
|
||||
$(ECHO) "$(COMPILE.c) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
|
||||
`$(CAT) $(COMPILE_LIST.c)`" ; \
|
||||
( $(COMPILE.c) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
|
||||
`$(CAT) $(COMPILE_LIST.c)` && \
|
||||
$(ECHO) "$(MV) `$(CAT) $(COMPILE_OBJ_LIST.c)` $(OBJDIR)" && \
|
||||
$(MV) `$(CAT) $(COMPILE_OBJ_LIST.c)` $(OBJDIR) ) || exit 1 ; \
|
||||
fi
|
||||
@if [ -s $(COMPILE_LIST.cpp) ] ; then \
|
||||
$(ECHO) "$(COMPILE.cpp) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
|
||||
`$(CAT) $(COMPILE_LIST.cpp)`" ; \
|
||||
( $(COMPILE.cpp) $(CFLAGS_GPROF) $(AUTOMATIC_PCH_OPTION) \
|
||||
`$(CAT) $(COMPILE_LIST.cpp)` && \
|
||||
$(ECHO) "$(MV) `$(CAT) $(COMPILE_OBJ_LIST.cpp)` $(OBJDIR)" && \
|
||||
$(MV) `$(CAT) $(COMPILE_OBJ_LIST.cpp)` $(OBJDIR) ) || exit 1 ; \
|
||||
fi
|
||||
@$(RM) $(COMPILE_BATCH.c) $(COMPILE_LIST.c) $(COMPILE_OBJ_LIST.c)
|
||||
@$(RM) $(COMPILE_BATCH.cpp) $(COMPILE_LIST.cpp) $(COMPILE_OBJ_LIST.cpp)
|
||||
|
||||
endif
|
||||
|
||||
# newer as does not handle c++ style comments
|
||||
$(OBJDIR)/%.$(OBJECT_SUFFIX): %.s
|
||||
ifneq ($(CC_VERSION), gcc)
|
||||
@$(prep-target)
|
||||
$(COMPILE.s) $(CC_OBJECT_OUTPUT_FLAG)$@ $<
|
||||
else
|
||||
@$(prep-target)
|
||||
$(CPP) -x assembler-with-cpp $< | $(COMPILE.s) -o $@
|
||||
endif
|
||||
@$(check-conventions)
|
||||
|
||||
#
|
||||
# Quick hack for making the compiler generate just the assembly file.
|
||||
# $ gnumake obj/sparc/myfile.s
|
||||
#
|
||||
$(OBJDIR)/%.s: %.c
|
||||
@$(prep-target)
|
||||
$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ -S $<
|
||||
@$(check-conventions)
|
||||
|
||||
# remove the intermediate files from the directories.
|
||||
# (If VARIANT=OPT, this removes all debug and fastdebug files too)
|
||||
clobber clean::
|
||||
$(RM) -r $(OBJDIR)
|
||||
$(RM) -r $(OBJDIR)_*
|
||||
|
||||
#
|
||||
# Lint support
|
||||
# (The 'lint' rule below is an older rule not using the .$(LINT_SUFFIX) files)
|
||||
#
|
||||
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
$(OBJDIR)/%.$(LINT_SUFFIX): %.c
|
||||
@$(prep-target)
|
||||
$(LINT.c) -dirout=$(OBJDIR) -c $<
|
||||
lint.clean:
|
||||
$(RM) $(OBJDIR)/*.$(LINT_SUFFIX)
|
||||
# Old rule
|
||||
lint: $(FILES_c)
|
||||
ifneq ($(FILES_c),)
|
||||
$(LINT.c) -Ncheck -Nlevel=3 $? $(LDLIBS) > lint.$(ARCH) 2>&1
|
||||
endif
|
||||
endif
|
||||
|
||||
.PHONY: batch_compile
|
||||
|
||||
|
@ -1,119 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2009, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# GCC Compiler settings
|
||||
#
|
||||
|
||||
COMPILER_NAME=GCC
|
||||
|
||||
ifeq ($(PLATFORM), windows)
|
||||
|
||||
# Settings specific to Windows, pretty stale, hasn't been used
|
||||
CC = $(COMPILER_PATH)gcc
|
||||
CPP = $(COMPILER_PATH)gcc -E
|
||||
CXX = $(COMPILER_PATH)g++
|
||||
CCC = $(COMPILER_PATH)g++
|
||||
LIBEXE = $(COMPILER_PATH)lib
|
||||
LINK = $(COMPILER_PATH)link
|
||||
RC = $(MSDEVTOOLS_PATH)link
|
||||
LINK32 = $(LINK)
|
||||
RSC = $(RC)
|
||||
# unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
|
||||
NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
CC_VER = UNKNOWN
|
||||
CC_TYPE = UNKNOWN
|
||||
else
|
||||
CC_VER = UNKNOWN
|
||||
CC_TYPE = UNKNOWN
|
||||
endif
|
||||
_LINK_VER :=$(shell $(LINK) 2>&1 | $(HEAD) -n 1)
|
||||
LINK_VER :=$(call GetVersion,"$(_LINK_VER)")
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), linux)
|
||||
|
||||
# Settings specific to Linux
|
||||
CC = $(COMPILER_PATH)gcc
|
||||
CPP = $(COMPILER_PATH)gcc -E
|
||||
# statically link libstdc++ before C++ ABI is stablized on Linux
|
||||
STATIC_CXX = true
|
||||
ifeq ($(STATIC_CXX),true)
|
||||
# g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++"
|
||||
# We need to use gcc to statically link the C++ runtime. gcc and g++ use
|
||||
# the same subprocess to compile C++ files, so it is OK to build using gcc.
|
||||
CXX = $(COMPILER_PATH)gcc
|
||||
else
|
||||
CXX = $(COMPILER_PATH)g++
|
||||
endif
|
||||
ifeq ($(ZERO_BUILD), true)
|
||||
# zero
|
||||
REQUIRED_CC_VER = 3.2
|
||||
REQUIRED_GCC_VER = 3.2.*
|
||||
else
|
||||
ifneq ("$(findstring sparc,$(ARCH))", "")
|
||||
# sparc or sparcv9
|
||||
REQUIRED_CC_VER = 4.0
|
||||
else
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
# i586
|
||||
REQUIRED_CC_VER = 3.2
|
||||
else
|
||||
ifeq ($(ARCH), amd64)
|
||||
# amd64
|
||||
REQUIRED_CC_VER = 3.2
|
||||
endif
|
||||
ifeq ($(ARCH), ia64)
|
||||
# ia64
|
||||
REQUIRED_CC_VER = 3.2
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
# Option used to create a shared library
|
||||
SHARED_LIBRARY_FLAG = -shared -mimpure-text
|
||||
SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
|
||||
# Settings specific to Solaris
|
||||
CC = $(COMPILER_PATH)gcc
|
||||
CPP = $(COMPILER_PATH)gcc -E
|
||||
CXX = $(COMPILER_PATH)g++
|
||||
REQUIRED_CC_VER = 3.2
|
||||
|
||||
# Option used to create a shared library
|
||||
SHARED_LIBRARY_FLAG = -G
|
||||
|
||||
endif
|
||||
|
||||
# Get gcc version
|
||||
_CC_VER :=$(shell $(CC) -dumpversion 2>&1 )
|
||||
CC_VER :=$(call GetVersion,"$(_CC_VER)")
|
||||
|
@ -1,186 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2009, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# MSVC Compiler settings
|
||||
#
|
||||
|
||||
ifeq ($(PLATFORM), windows)
|
||||
CC = $(COMPILER_PATH)cl
|
||||
CPP = $(COMPILER_PATH)cl
|
||||
CXX = $(COMPILER_PATH)cl
|
||||
CCC = $(COMPILER_PATH)cl
|
||||
LIBEXE = $(COMPILER_PATH)lib
|
||||
LINK = $(COMPILER_PATH)link
|
||||
RC = $(MSDEVTOOLS_PATH)rc
|
||||
LINK32 = $(LINK)
|
||||
RSC = $(RC)
|
||||
|
||||
# Fill in unknown values
|
||||
COMPILER_NAME=Unknown MSVC Compiler
|
||||
COMPILER_VERSION=
|
||||
REQUIRED_CC_VER=
|
||||
REQUIRED_LINK_VER=
|
||||
|
||||
# unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
|
||||
NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
|
||||
|
||||
# Compiler version and type (Always get word after "Version")
|
||||
ifndef CC_VER
|
||||
CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
|
||||
export CC_VER
|
||||
endif
|
||||
|
||||
# SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
ifndef LINK_VER
|
||||
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
|
||||
export LINK_VER
|
||||
endif
|
||||
CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
|
||||
ifeq ($(CC_MAJORVER), 13)
|
||||
# This should be: CC_VER=13.10.3077 LINK_VER=7.10.3077
|
||||
REQUIRED_CC_VER = 13.10.3077
|
||||
REQUIRED_LINK_VER = 7.10.3077
|
||||
COMPILER_NAME=Visual Studio .NET 2003 Professional C++
|
||||
COMPILER_VERSION=VS2003
|
||||
REBASE = $(COMPILER_PATH)../../Common7/Tools/Bin/rebase
|
||||
MTL = $(COMPILER_PATH)../../Common7/Tools/Bin/midl
|
||||
ifndef COMPILER_PATH
|
||||
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CC_MAJORVER), 14)
|
||||
# This should be: CC_VER=14.00.50727.42 LINK_VER=8.00.50727.42
|
||||
REQUIRED_CC_VER = 14.00.50727.42
|
||||
REQUIRED_LINK_VER = 8.00.50727.42
|
||||
COMPILER_NAME=Visual Studio 8
|
||||
COMPILER_VERSION=VS2005
|
||||
REBASE = $(COMPILER_PATH)../../Common8/Tools/Bin/rebase
|
||||
MTL = $(COMPILER_PATH)../../Common8/Tools/Bin/midl
|
||||
ifndef COMPILER_PATH
|
||||
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CC_MAJORVER), 15)
|
||||
# This should be: CC_VER=15.00.21022.08 LINK_VER=9.00.21022.08
|
||||
REQUIRED_CC_VER = 15.00.21022.08
|
||||
REQUIRED_LINK_VER = 9.00.21022.08
|
||||
COMPILER_NAME=Visual Studio 9
|
||||
COMPILER_VERSION=VS2008
|
||||
#rebase and midl moved out of Visual Studio into the SDK:
|
||||
REBASE = $(MSDEVTOOLS_PATH)/rebase
|
||||
MTL = $(MSDEVTOOLS_PATH)/midl.exe
|
||||
ifndef COMPILER_PATH
|
||||
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CC_MAJORVER), 16)
|
||||
# This should be: CC_VER=16.00.30319.01 LINK_VER=10.00.30319.01
|
||||
REQUIRED_CC_VER = 16.00.30319.01
|
||||
REQUIRED_LINK_VER = 10.00.30319.01
|
||||
COMPILER_NAME=Visual Studio 10
|
||||
COMPILER_VERSION=VS2010
|
||||
#rebase and midl moved out of Visual Studio into the SDK:
|
||||
REBASE = $(MSDEVTOOLS_PATH)/rebase
|
||||
MTL = $(MSDEVTOOLS_PATH)/midl.exe
|
||||
ifndef COMPILER_PATH
|
||||
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
# else ARCH_DATA_MODEL is 64
|
||||
ifndef LINK_VER
|
||||
LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
|
||||
export LINK_VER
|
||||
endif
|
||||
CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
|
||||
CC_MINORVER :=$(call MinorVersion,$(CC_VER))
|
||||
CC_MICROVER :=$(call MicroVersion,$(CC_VER))
|
||||
ifeq ($(ARCH), ia64)
|
||||
REQUIRED_CC_VER = 13.00.9337.7
|
||||
REQUIRED_LINK_VER = 7.00.9337.7
|
||||
endif
|
||||
ifeq ($(ARCH), amd64)
|
||||
REQUIRED_CC_VER = 14.00.40310.41
|
||||
REQUIRED_LINK_VER = 8.00.40310.39
|
||||
endif
|
||||
ifeq ($(CC_MAJORVER), 13)
|
||||
ifeq ($(ARCH), ia64)
|
||||
# This should be: CC_VER=13.00.9337.7 LINK_VER=7.00.9337.7
|
||||
COMPILER_NAME=Microsoft Platform SDK - November 2001 Edition
|
||||
COMPILER_VERSION=VS2003
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CC_MAJORVER), 14)
|
||||
ifeq ($(ARCH), amd64)
|
||||
ifeq ($(CC_MICROVER), 30701)
|
||||
# This should be: CC_VER=14.00.30701 LINK_VER=8.00.30701
|
||||
# WARNING: it says 14, but it is such an early build it doesn't
|
||||
# have all the VS2005 compiler option changes, so treat
|
||||
# this like a VS2003 compiler.
|
||||
COMPILER_NAME=Microsoft Platform SDK - February 2003 Edition
|
||||
COMPILER_VERSION=VS2003
|
||||
else
|
||||
# This should be: CC_VER=14.00.40310.41 LINK_VER=8.00.40310.39
|
||||
COMPILER_NAME=Microsoft Platform SDK - April 2005 Edition (3790.1830)
|
||||
COMPILER_VERSION=VS2005
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CC_MAJORVER), 15)
|
||||
# This should be: CC_VER=15.00.21022.8 LINK_VER=9.00.21022.8
|
||||
REQUIRED_CC_VER = 15.00.21022.8
|
||||
REQUIRED_LINK_VER = 9.00.21022.8
|
||||
COMPILER_NAME=Windows SDK 6.1 Visual Studio 9
|
||||
COMPILER_VERSION=VS2008
|
||||
RC = $(MSSDK61)/bin/x64/rc
|
||||
REBASE = $(MSSDK61)/bin/x64/rebase
|
||||
else
|
||||
ifeq ($(CC_MAJORVER), 16)
|
||||
# This should be: CC_VER=16.00.30319.01 LINK_VER=9.00.30319.01
|
||||
REQUIRED_CC_VER = 16.00.30319.01
|
||||
REQUIRED_LINK_VER = 10.00.30319.01
|
||||
COMPILER_NAME=Microsoft Visual Studio 10
|
||||
COMPILER_VERSION=VS2010
|
||||
RC = $(MSSDK7)/bin/x64/rc
|
||||
REBASE = $(MSSDK7)/bin/x64/rebase
|
||||
else
|
||||
# This will cause problems if ALT_COMPILER_PATH is defined to ""
|
||||
# which is a directive to use the PATH.
|
||||
REBASE = $(COMPILER_PATH)../REBASE
|
||||
endif
|
||||
endif
|
||||
ifndef COMPILER_PATH
|
||||
COMPILER_PATH := $(error COMPILER_PATH cannot be empty here)
|
||||
endif
|
||||
endif
|
||||
ifndef COMPILER_VERSION
|
||||
COMPILER_VERSION := $(error COMPILER_VERSION cannot be empty here)
|
||||
endif
|
||||
# Shared library generation flag
|
||||
SHARED_LIBRARY_FLAG = -LD
|
||||
endif
|
||||
|
@ -1,69 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2009, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Sun Studio Compiler settings
|
||||
#
|
||||
|
||||
COMPILER_NAME=Sun Studio
|
||||
|
||||
# Sun Studio Compiler settings specific to Solaris
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
COMPILER_VERSION=SS12
|
||||
REQUIRED_CC_VER=5.9
|
||||
CC = $(COMPILER_PATH)cc
|
||||
CPP = $(COMPILER_PATH)cc -E
|
||||
CXX = $(COMPILER_PATH)CC
|
||||
LINT = $(COMPILER_PATH)lint
|
||||
# Option used to create a shared library
|
||||
SHARED_LIBRARY_FLAG = -G
|
||||
endif
|
||||
|
||||
# Sun Studio Compiler settings specific to Linux
|
||||
ifeq ($(PLATFORM), linux)
|
||||
# This has not been tested
|
||||
COMPILER_VERSION=SS12
|
||||
REQUIRED_CC_VER=5.9
|
||||
CC = $(COMPILER_PATH)cc
|
||||
CPP = $(COMPILER_PATH)cc -E
|
||||
CXX = $(COMPILER_PATH)CC
|
||||
LINT = $(COMPILER_PATH)lint
|
||||
# statically link libstdc++ before C++ ABI is stablized on Linux
|
||||
STATIC_CXX = true
|
||||
ifeq ($(STATIC_CXX),true)
|
||||
# CC always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++"
|
||||
# We need to use cc to statically link the C++ runtime.
|
||||
CXX = $(COMPILER_PATH)cc
|
||||
else
|
||||
CXX = $(COMPILER_PATH)CC
|
||||
endif
|
||||
# Option used to create a shared library
|
||||
SHARED_LIBRARY_FLAG = -G
|
||||
endif
|
||||
|
||||
# Get compiler version
|
||||
_CC_VER :=$(shell $(CC) -V 2>&1 | $(HEAD) -n 1)
|
||||
CC_VER :=$(call GetVersion,"$(_CC_VER)")
|
||||
|
@ -42,7 +42,7 @@ else
|
||||
endif
|
||||
|
||||
#
|
||||
# All java tools (javac, javah, and javadoc) run faster with certain java
|
||||
# All java tools (javac and javadoc) run faster with certain java
|
||||
# options, this macro should be used with all these tools.
|
||||
# In particular, the client VM makes these tools run faster when
|
||||
# it's available.
|
||||
@ -134,21 +134,14 @@ JAVACFLAGS += -encoding ascii
|
||||
JAVACFLAGS += -classpath $(BOOTDIR)/lib/tools.jar
|
||||
JAVACFLAGS += $(OTHER_JAVACFLAGS)
|
||||
|
||||
# Needed for javah
|
||||
JAVAHFLAGS += -classpath $(CLASSBINDIR)
|
||||
|
||||
# Langtools
|
||||
ifdef LANGTOOLS_DIST
|
||||
JAVAC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javac.jar
|
||||
JAVAH_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javah.jar
|
||||
JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
|
||||
DOCLETS_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/doclets.jar
|
||||
JAVAC_CMD = $(BOOT_JAVA_CMD) \
|
||||
"-Xbootclasspath/p:$(JAVAC_JAR)" \
|
||||
-jar $(JAVAC_JAR) $(JAVACFLAGS)
|
||||
JAVAH_CMD = $(BOOT_JAVA_CMD) \
|
||||
"-Xbootclasspath/p:$(JAVAH_JAR)$(CLASSPATH_SEPARATOR)$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)" \
|
||||
-jar $(JAVAH_JAR) $(JAVAHFLAGS)
|
||||
JAVADOC_CMD = $(BOOT_JAVA_CMD) \
|
||||
"-Xbootclasspath/p:$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)" \
|
||||
-jar $(JAVADOC_JAR)
|
||||
@ -156,8 +149,6 @@ else
|
||||
# If no explicit tools, use boot tools (add VM flags in this case)
|
||||
JAVAC_CMD = $(JAVA_TOOLS_DIR)/javac $(JAVAC_JVM_FLAGS) \
|
||||
$(JAVACFLAGS)
|
||||
JAVAH_CMD = $(JAVA_TOOLS_DIR)/javah \
|
||||
$(JAVAHFLAGS)
|
||||
JAVADOC_CMD = $(JAVA_TOOLS_DIR)/javadoc $(JAVA_TOOLS_FLAGS:%=-J%)
|
||||
endif
|
||||
|
||||
|
@ -94,14 +94,6 @@ else
|
||||
JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
|
||||
endif
|
||||
|
||||
# COMPILER_PATH: path to where the compiler and tools are installed.
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
|
||||
COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
|
||||
else
|
||||
COMPILER_PATH =/usr/bin/
|
||||
endif
|
||||
|
||||
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
|
||||
|
@ -86,24 +86,6 @@ else
|
||||
JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
|
||||
endif
|
||||
|
||||
# COMPILER_PATH: path to where the compiler and tools are installed.
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
|
||||
COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
|
||||
else
|
||||
# Careful here, COMPILER_VERSION may not be defined yet (see Compiler.gmk)
|
||||
# If the place where we keep a set of Sun Studio compilers doesn't exist,
|
||||
# try and use /opt/SUNWspro, the default location for the SS compilers.
|
||||
# (DirExists checks for this path twice, an automount double check)
|
||||
_SUNSTUDIO_SET_ROOT=$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/SUNWspro
|
||||
SUNSTUDIO_SET_ROOT:=$(call DirExists,$(_SUNSTUDIO_SET_ROOT),$(_SUNSTUDIO_SET_ROOT),)
|
||||
ifneq ($(SUNSTUDIO_SET_ROOT),)
|
||||
COMPILER_PATH =$(SUNSTUDIO_SET_ROOT)/$(COMPILER_VERSION)/bin/
|
||||
else
|
||||
COMPILER_PATH =/opt/SUNWspro/bin/
|
||||
endif
|
||||
endif
|
||||
|
||||
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
|
||||
|
@ -31,7 +31,6 @@
|
||||
# Level: Default is 3, 0 means none, 4 is the most but may be unreliable
|
||||
# Some makefiles may have set this to 0 to turn off warnings completely,
|
||||
# which also effectively creates a COMPILER_WARNINGS_FATAL=false situation.
|
||||
# Program.gmk may turn this down to 2 (building .exe's).
|
||||
# Windows 64bit platforms are less likely to be warning free.
|
||||
# Historically, Windows 32bit builds should be mostly warning free.
|
||||
ifndef COMPILER_WARNING_LEVEL
|
||||
@ -74,7 +73,7 @@ override INCREMENTAL_BUILD = false
|
||||
# The ALT values should never really have spaces or use \.
|
||||
# Suspect these environment variables to have spaces and/or \ characters:
|
||||
# SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
|
||||
# MSTOOLS, Mstools, MSSDK, MSSdk, VC71COMNTOOLS,
|
||||
# VC71COMNTOOLS,
|
||||
# MSVCDIR, MSVCDir.
|
||||
# So use $(subst \,/,) on them first adding quotes and placing them in
|
||||
# their own variable assigned with :=, then use FullPath.
|
||||
@ -201,124 +200,6 @@ ifndef SHORTPROGRAMFILES
|
||||
export SHORTPROGRAMFILES
|
||||
endif
|
||||
|
||||
# Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit]
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
ifndef SHORTMSVCDIR
|
||||
# Try looking in MSVCDIR or MSVCDir area first (set by vcvars32.bat)
|
||||
ifdef MSVCDIR
|
||||
xMSVCDIR :="$(subst \,/,$(MSVCDIR))"
|
||||
SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
|
||||
else
|
||||
ifdef MSVCDir
|
||||
xMSVCDIR :="$(subst \,/,$(MSVCDir))"
|
||||
SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
|
||||
else
|
||||
ifneq ($(SHORTPROGRAMFILES),)
|
||||
xMSVCDIR :="$(SHORTPROGRAMFILES)/Microsoft Visual Studio .NET 2003/Vc7"
|
||||
SHORTMSVCDIR :=$(call FullPath,$(xMSVCDIR))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(subst MSDev98,OLDOLDOLD,$(SHORTMSVCDIR)),$(SHORTMSVCDIR))
|
||||
SHORTMSVCDIR :=
|
||||
endif
|
||||
# If we still don't have it, look for VS100COMNTOOLS, setup by installer?
|
||||
ifeq ($(SHORTMSVCDIR),)
|
||||
ifdef VS100COMNTOOLS # /Common/Tools directory, use ../../Vc
|
||||
xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))"
|
||||
_vs100tools :=$(call FullPath,$(xVS100COMNTOOLS))
|
||||
endif
|
||||
ifneq ($(_vs100tools),)
|
||||
SHORTMSVCDIR :=$(_vs100tools)/../../Vc
|
||||
endif
|
||||
endif
|
||||
export SHORTMSVCDIR
|
||||
# If we still don't have it, look for VS71COMNTOOLS, setup by installer?
|
||||
ifeq ($(SHORTMSVCDIR),)
|
||||
ifdef VS71COMNTOOLS # /Common/Tools directory, use ../../Vc7
|
||||
xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
|
||||
_vs71tools :=$(call FullPath,$(xVS71COMNTOOLS))
|
||||
endif
|
||||
ifneq ($(_vs71tools),)
|
||||
SHORTMSVCDIR :=$(_vs71tools)/../../Vc7
|
||||
endif
|
||||
endif
|
||||
export SHORTMSVCDIR
|
||||
endif
|
||||
ifneq ($(SHORTMSVCDIR),)
|
||||
SHORTCOMPILERBIN :=$(SHORTMSVCDIR)/Bin
|
||||
SHORTPSDK :=$(SHORTMSVCDIR)/PlatformSDK
|
||||
export SHORTCOMPILERBIN
|
||||
export SHORTPSDK
|
||||
endif
|
||||
endif
|
||||
|
||||
# The Microsoft Platform SDK installed by itself
|
||||
ifneq ($(SHORTPROGRAMFILES),)
|
||||
ifndef SHORTPSDK
|
||||
xPSDK :="$(SHORTPROGRAMFILES)/Microsoft Platform SDK"
|
||||
SHORTPSDK :=$(call FullPath,$(xPSDK))
|
||||
ifeq ($(SHORTPSDK),)
|
||||
xPSDK :="$(SHORTPROGRAMFILES)/Microsoft SDK"
|
||||
SHORTPSDK :=$(call FullPath,$(xMSSDK))
|
||||
endif
|
||||
export SHORTPSDK
|
||||
endif
|
||||
endif
|
||||
|
||||
# If no SDK found yet, look in other places
|
||||
ifndef SHORTPSDK
|
||||
ifdef MSSDK
|
||||
xMSSDK :="$(subst \,/,$(MSSDK))"
|
||||
SHORTPSDK :=$(call FullPath,$(xMSSDK))
|
||||
else
|
||||
ifdef MSSdk
|
||||
xMSSDK :="$(subst \,/,$(MSSdk))"
|
||||
SHORTPSDK :=$(call FullPath,$(xMSSDK))
|
||||
endif
|
||||
endif
|
||||
export SHORTPSDK
|
||||
endif
|
||||
|
||||
# Compilers for 64bit are from SDK
|
||||
ifeq ($(ARCH_DATA_MODEL), 64)
|
||||
ifndef SHORTCOMPILERBIN
|
||||
ifdef VS100COMNTOOLS # /Common7/Tools directory, use ../../Vc
|
||||
xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))"
|
||||
_vs100tools :=$(call FullPath,$(xVS100COMNTOOLS))
|
||||
endif
|
||||
ifneq ($(_vs100tools),)
|
||||
SHORTCOMPILERBIN :=$(_vs100tools)/../../Vc/bin/amd64
|
||||
xMSSDK70 :="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/"
|
||||
MSSDK7 :=$(call FullPath,$(xMSSDK70))
|
||||
export MSSDK7
|
||||
else
|
||||
xMSSDK61 :="C:/Program Files/Microsoft SDKs/Windows/v6.1/"
|
||||
MSSDK61 :=$(call FullPath,$(xMSSDK61))
|
||||
xVS2008 :="C:/Program Files (x86)/Microsoft Visual Studio 9.0/"
|
||||
_vs2008 :=$(call FullPath,$(xVS2008))
|
||||
ifneq ($(_vs2008),)
|
||||
ifeq ($(ARCH), ia64)
|
||||
SHORTCOMPILERBIN :=$(_vs2008)/VC/Bin/x86_ia64
|
||||
endif
|
||||
ifeq ($(ARCH), amd64)
|
||||
SHORTCOMPILERBIN :=$(_vs2008)/VC/Bin/$(ARCH)
|
||||
endif
|
||||
else
|
||||
ifneq ($(SHORTPSDK),)
|
||||
ifeq ($(ARCH), ia64)
|
||||
SHORTCOMPILERBIN :=$(SHORTPSDK)/Bin/Win64
|
||||
endif
|
||||
ifeq ($(ARCH), amd64)
|
||||
SHORTCOMPILERBIN :=$(SHORTPSDK)/Bin/Win64/x86/$(ARCH)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
export SHORTCOMPILERBIN
|
||||
endif
|
||||
endif
|
||||
|
||||
# Location on system where jdk installs might be
|
||||
ifneq ($(SHORTPROGRAMFILES),)
|
||||
USRJDKINSTANCES_PATH =$(SHORTPROGRAMFILES)/Java
|
||||
@ -356,55 +237,6 @@ ifndef JDK_DEVTOOLS_DIR
|
||||
export JDK_DEVTOOLS_DIR
|
||||
endif
|
||||
|
||||
# COMPILER_PATH: path to where the compiler and tools are installed.
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifndef COMPILER_PATH
|
||||
ifdef ALT_COMPILER_PATH
|
||||
xALT_COMPILER_PATH :="$(subst \,/,$(ALT_COMPILER_PATH))"
|
||||
fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
|
||||
COMPILER_PATH :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
|
||||
else
|
||||
COMPILER_PATH :=$(call PrefixPath,$(SHORTCOMPILERBIN))
|
||||
endif
|
||||
COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
|
||||
export COMPILER_PATH
|
||||
endif
|
||||
|
||||
# MSDEVTOOLS_PATH: path to where the additional MS Compiler tools are.
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifndef MSDEVTOOLS_PATH
|
||||
ifdef ALT_MSDEVTOOLS_PATH
|
||||
xALT_MSDEVTOOLS_PATH :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))"
|
||||
fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH))
|
||||
MSDEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH))
|
||||
else
|
||||
ifeq ($(ARCH_DATA_MODEL), 64)
|
||||
ifdef MSTOOLS
|
||||
xMSTOOLS :="$(subst \,/,$(MSTOOLS))"
|
||||
_ms_tools :=$(call FullPath,$(xMSTOOLS))
|
||||
else
|
||||
ifdef Mstools
|
||||
xMSTOOLS :="$(subst \,/,$(Mstools))"
|
||||
_ms_tools :=$(call FullPath,$(xMSTOOLS))
|
||||
else
|
||||
_ms_tools :=
|
||||
endif
|
||||
endif
|
||||
ifneq ($(_ms_tools),)
|
||||
_ms_tools_bin :=$(_ms_tools)/Bin
|
||||
else
|
||||
# Assumes compiler bin is .../Bin/win64/x86/AMD64, rc.exe is 3 levels up
|
||||
_ms_tools_bin :=$(SHORTCOMPILERBIN)/../../..
|
||||
endif
|
||||
else
|
||||
_ms_tools_bin :=$(SHORTCOMPILERBIN)
|
||||
endif
|
||||
MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin))
|
||||
endif
|
||||
MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
|
||||
export MSDEVTOOLS_PATH
|
||||
endif
|
||||
|
||||
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifndef DEVTOOLS_PATH
|
||||
|
@ -51,7 +51,7 @@
|
||||
# Get shared system utilities macros defined
|
||||
include $(BUILDDIR)/common/shared/Defs-utils.gmk
|
||||
|
||||
# Assumes ARCH, PLATFORM, ARCH_VM_SUBDIR, etc. have been defined.
|
||||
# Assumes ARCH, PLATFORM, etc. have been defined.
|
||||
|
||||
# Simple pwd path
|
||||
define PwdPath
|
||||
@ -157,7 +157,6 @@ endef
|
||||
_check_values:=\
|
||||
$(call CheckValue,ARCH,),\
|
||||
$(call CheckValue,ARCH_DATA_MODEL,),\
|
||||
$(call CheckValue,ARCH_VM_SUBDIR,),\
|
||||
$(call CheckValue,VARIANT,),\
|
||||
$(call CheckValue,PLATFORM,)
|
||||
|
||||
@ -194,21 +193,15 @@ endif
|
||||
# can be OPT or DBG, default is OPT
|
||||
# Determine the extra pattern to add to the release name for debug/fastdebug.
|
||||
# Determine the JDK_IMPORT_VARIANT, so we get the right VM files copied over.
|
||||
# Determine suffix for obj directory or OBJDIR, for .o files.
|
||||
# (by keeping .o files separate, just .o files, they don't clobber each
|
||||
# other, however, the library files will clobber each other).
|
||||
#
|
||||
ifeq ($(VARIANT), DBG)
|
||||
BUILD_VARIANT_RELEASE=-debug
|
||||
OBJDIRNAME_SUFFIX=_g
|
||||
else
|
||||
BUILD_VARIANT_RELEASE=
|
||||
OBJDIRNAME_SUFFIX=
|
||||
endif
|
||||
ifeq ($(FASTDEBUG), true)
|
||||
VARIANT=DBG
|
||||
BUILD_VARIANT_RELEASE=-fastdebug
|
||||
OBJDIRNAME_SUFFIX=_gO
|
||||
_JDK_IMPORT_VARIANT=/fastdebug
|
||||
endif
|
||||
|
||||
@ -330,6 +323,4 @@ BINDIR = $(OUTPUTDIR)/bin$(ISA_DIR)
|
||||
# Absolute path to output directory
|
||||
ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR))
|
||||
|
||||
# Get shared compiler settings
|
||||
include $(BUILDDIR)/common/shared/Compiler.gmk
|
||||
|
||||
|
@ -58,19 +58,10 @@ PLATFORM_SHARED=done
|
||||
# ARCH sparc, sparcv9, i586, amd64, or ia64
|
||||
# ARCH_FAMILY sparc or i586
|
||||
# ARCHPROP sparc or x86
|
||||
# ARCH_VM_SUBDIR jre/bin, jre/lib/sparc, etc.
|
||||
# LIBARCH sparc, sparcv9, i386, amd64, or ia64
|
||||
# DEV_NULL destination of /dev/null, NUL or /dev/NULL
|
||||
# CLASSPATH_SEPARATOR separator in classpath, ; or :
|
||||
# LIB_PREFIX dynamic or static library prefix, lib or empty
|
||||
# LIB_SUFFIX static library file suffix, .lib or .a?
|
||||
# LIBRARY_SUFFIX dynamic library file suffix, .dll or .so
|
||||
# OBJECT_SUFFIX object file suffix, .o or .obj
|
||||
# EXE_SUFFIX executable file suffix, .exe or empty
|
||||
# BUNDLE_FILE_SUFFIX suffix for bundles: .tar or .tar.gz
|
||||
# ISA_DIR solaris only: /sparcv9 or /amd64
|
||||
# LIBARCH32 solaris only: sparc or i386
|
||||
# LIBARCH64 solaris only: sparcv9 or amd64
|
||||
# REQUIRED_WINDOWS_NAME windows only: basic name of windows
|
||||
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows
|
||||
# USING_CYGWIN windows only: true or false
|
||||
@ -129,7 +120,6 @@ ifeq ($(SYSTEM_UNAME), SunOS)
|
||||
# Need to maintain the jre/lib/i386 location for 32-bit Intel
|
||||
ifeq ($(ARCH), i586)
|
||||
ARCH_FAMILY = $(ARCH)
|
||||
LIBARCH = i386
|
||||
# Value of Java os.arch property
|
||||
ARCHPROP = x86
|
||||
else
|
||||
@ -138,17 +128,8 @@ ifeq ($(SYSTEM_UNAME), SunOS)
|
||||
else
|
||||
ARCH_FAMILY = sparc
|
||||
endif
|
||||
LIBARCH = $(ARCH)
|
||||
# Value of Java os.arch property
|
||||
ARCHPROP = $(LIBARCH)
|
||||
endif
|
||||
# The two LIBARCH names
|
||||
ifeq ($(ARCH_FAMILY), sparc)
|
||||
LIBARCH32 = sparc
|
||||
LIBARCH64 = sparcv9
|
||||
else
|
||||
LIBARCH32 = i386
|
||||
LIBARCH64 = amd64
|
||||
ARCHPROP = $(ARCH)
|
||||
endif
|
||||
# Suffix for file bundles used in previous release
|
||||
BUNDLE_FILE_SUFFIX=.tar
|
||||
@ -218,16 +199,12 @@ ifeq ($(SYSTEM_UNAME), Linux)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Need to maintain the jre/lib/i386 location for 32-bit Intel
|
||||
ifeq ($(ARCH), i586)
|
||||
LIBARCH = i386
|
||||
ARCHPROP = i386
|
||||
else
|
||||
LIBARCH = $(ARCH)
|
||||
ARCHPROP = $(ARCH)
|
||||
endif
|
||||
|
||||
# Value of Java os.arch property
|
||||
ARCHPROP = $(LIBARCH)
|
||||
|
||||
# Suffix for file bundles used in previous release
|
||||
BUNDLE_FILE_SUFFIX=.tar.gz
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
@ -303,9 +280,7 @@ ifeq ($(PLATFORM), windows)
|
||||
endif
|
||||
endif
|
||||
export ARCH_DATA_MODEL
|
||||
# LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
|
||||
ARCH=i586
|
||||
LIBARCH=i386
|
||||
# Value of Java os.arch property
|
||||
ARCHPROP=x86
|
||||
REQUIRED_WINDOWS_NAME=Windows Professional 2000
|
||||
@ -323,9 +298,8 @@ ifeq ($(PLATFORM), windows)
|
||||
ARCH=ia64
|
||||
endif
|
||||
endif
|
||||
LIBARCH=$(ARCH)
|
||||
# Value of Java os.arch property
|
||||
ARCHPROP=$(LIBARCH)
|
||||
ARCHPROP=$(ARCH)
|
||||
endif
|
||||
ARCH_FAMILY = $(ARCH)
|
||||
# Where is unwanted output to be delivered?
|
||||
@ -337,14 +311,6 @@ ifeq ($(PLATFORM), windows)
|
||||
export DEV_NULL
|
||||
# Classpath separator
|
||||
CLASSPATH_SEPARATOR = ;
|
||||
# The suffix used for object file (.o for unix .obj for windows)
|
||||
OBJECT_SUFFIX = obj
|
||||
# The suffix applied to executables (.exe for windows, nothing for solaris)
|
||||
EXE_SUFFIX = .exe
|
||||
# The prefix applied to library files (lib for solaris, nothing for windows)
|
||||
LIB_PREFIX=
|
||||
LIBRARY_SUFFIX = dll
|
||||
LIB_SUFFIX = lib
|
||||
# User name determination (set _USER)
|
||||
ifndef USER
|
||||
ifdef USERNAME
|
||||
@ -359,8 +325,6 @@ ifeq ($(PLATFORM), windows)
|
||||
else
|
||||
_USER:=$(USER)
|
||||
endif
|
||||
# Location of client/server directories
|
||||
ARCH_VM_SUBDIR=jre/bin
|
||||
# Suffix for file bundles used in previous release
|
||||
BUNDLE_FILE_SUFFIX=.tar
|
||||
# Minimum disk space needed as determined by running 'du -sk' on
|
||||
@ -430,16 +394,6 @@ ifneq ($(PLATFORM), windows)
|
||||
export DEV_NULL
|
||||
# Character used between entries in classpath
|
||||
CLASSPATH_SEPARATOR = :
|
||||
# suffix used for object file (.o for unix .obj for windows)
|
||||
OBJECT_SUFFIX = o
|
||||
# The suffix applied to runtime libraries
|
||||
LIBRARY_SUFFIX = so
|
||||
# The suffix applied to link libraries
|
||||
LIB_SUFFIX = so
|
||||
# The suffix applied to executables (.exe for windows, nothing for solaris)
|
||||
EXE_SUFFIX =
|
||||
# The prefix applied to library files (lib for solaris, nothing for windows)
|
||||
LIB_PREFIX = lib
|
||||
# User name determination (set _USER)
|
||||
ifndef USER
|
||||
ifdef LOGNAME
|
||||
@ -450,8 +404,6 @@ ifneq ($(PLATFORM), windows)
|
||||
else
|
||||
_USER:=$(USER)
|
||||
endif
|
||||
# Location of client/server directories
|
||||
ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
|
||||
endif
|
||||
|
||||
# If blanks in the username, use the first 4 words and pack them together
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2006, 2010, 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,29 +24,13 @@
|
||||
#
|
||||
|
||||
# Properties for jprt
|
||||
jprt.tools.default.release=jdk1.7.0
|
||||
|
||||
# Specific platform list
|
||||
jprt.build.platforms=\
|
||||
solaris_sparc_5.10,\
|
||||
solaris_sparcv9_5.10,\
|
||||
solaris_i586_5.10,\
|
||||
solaris_x64_5.10,\
|
||||
linux_i586_2.6,\
|
||||
linux_x64_2.6,\
|
||||
windows_i586_5.0,\
|
||||
windows_x64_5.2
|
||||
# Use whatever release that the submitted job requests
|
||||
jprt.tools.default.release=${jprt.submit.release}
|
||||
|
||||
# The different build flavors we want
|
||||
# The different build flavors we want, we override here so we just get these 2
|
||||
jprt.build.flavors=product,fastdebug
|
||||
|
||||
# Explicitly designate what the 32bit match is for the 64bit build
|
||||
jprt.solaris_sparcv9.build.platform.match32=solaris_sparc_5.10
|
||||
jprt.solaris_sparcv9_5.10.build.platform.match32=solaris_sparc_5.10
|
||||
jprt.solaris_x64.build.platform.match32=solaris_i586_5.10
|
||||
jprt.solaris_x64_5.10.build.platform.match32=solaris_i586_5.10
|
||||
|
||||
# Directories needed to build
|
||||
jprt.bundle.src.dirs=make src
|
||||
jprt.bundle.exclude.src.dirs=build dist
|
||||
# Directories to be excluded from the source bundles
|
||||
jprt.bundle.exclude.src.dirs=build dist webrev
|
||||
|
||||
|
@ -32,12 +32,6 @@ PACKAGE = com.sun.tools.corba.se.idl
|
||||
PRODUCT = sun
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
# This program must contain a manifest that defines the execution level
|
||||
# needed to follow standard Vista User Access Control Guidelines
|
||||
# This must be set before Program.gmk is included
|
||||
#
|
||||
BUILD_MANIFEST=true
|
||||
|
||||
#
|
||||
# Files
|
||||
#
|
||||
|
@ -115,3 +115,9 @@ b4acf10eb134fe930802c97e36db65e7ccb544b5 jdk7-b104
|
||||
cc3fdfeb54b049f18edcf3463e6ab051d0b7b609 hs19-b05
|
||||
688a538aa65412178286ae2a6b0c00b6711e121b hs19-b06
|
||||
bf496cbe9b74dda5975a1559da7ecfdd313e509e jdk7-b107
|
||||
0000000000000000000000000000000000000000 hs19-b06
|
||||
6c43216df13513a0f96532aa06f213066c49e27b hs19-b06
|
||||
e44a93947ccbfce712b51725f313163606f15486 jdk7-b108
|
||||
cc4bb3022b3144dc5db0805b9ef6c7eff2aa3b81 jdk7-b109
|
||||
2f25f2b8de2700a1822463b1bd3d02b5e218018f jdk7-b110
|
||||
07b042e13dde4f3479ba9ec55120fcd5e8623323 jdk7-b111
|
||||
|
@ -1037,7 +1037,7 @@ public class CommandProcessor {
|
||||
public void prologue(Address start, Address end) {
|
||||
}
|
||||
public void visit(CodeBlob blob) {
|
||||
fout.println(gen.genHTML(blob.instructionsBegin()));
|
||||
fout.println(gen.genHTML(blob.contentBegin()));
|
||||
}
|
||||
public void epilogue() {
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2010, 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
|
||||
@ -54,7 +54,7 @@ public class Runtime1 {
|
||||
|
||||
/** FIXME: consider making argument "type-safe" in Java port */
|
||||
public Address entryFor(int id) {
|
||||
return blobFor(id).instructionsBegin();
|
||||
return blobFor(id).codeBegin();
|
||||
}
|
||||
|
||||
/** FIXME: consider making argument "type-safe" in Java port */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2010, 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
|
||||
@ -39,7 +39,8 @@ public class CodeBlob extends VMObject {
|
||||
private static CIntegerField sizeField;
|
||||
private static CIntegerField headerSizeField;
|
||||
private static CIntegerField relocationSizeField;
|
||||
private static CIntegerField instructionsOffsetField;
|
||||
private static CIntegerField contentOffsetField;
|
||||
private static CIntegerField codeOffsetField;
|
||||
private static CIntegerField frameCompleteOffsetField;
|
||||
private static CIntegerField dataOffsetField;
|
||||
private static CIntegerField frameSizeField;
|
||||
@ -68,7 +69,8 @@ public class CodeBlob extends VMObject {
|
||||
headerSizeField = type.getCIntegerField("_header_size");
|
||||
relocationSizeField = type.getCIntegerField("_relocation_size");
|
||||
frameCompleteOffsetField = type.getCIntegerField("_frame_complete_offset");
|
||||
instructionsOffsetField = type.getCIntegerField("_instructions_offset");
|
||||
contentOffsetField = type.getCIntegerField("_content_offset");
|
||||
codeOffsetField = type.getCIntegerField("_code_offset");
|
||||
dataOffsetField = type.getCIntegerField("_data_offset");
|
||||
frameSizeField = type.getCIntegerField("_frame_size");
|
||||
oopMapsField = type.getAddressField("_oop_maps");
|
||||
@ -111,11 +113,19 @@ public class CodeBlob extends VMObject {
|
||||
// public RelocInfo relocationBegin();
|
||||
// public RelocInfo relocationEnd();
|
||||
|
||||
public Address instructionsBegin() {
|
||||
return headerBegin().addOffsetTo(instructionsOffsetField.getValue(addr));
|
||||
public Address contentBegin() {
|
||||
return headerBegin().addOffsetTo(contentOffsetField.getValue(addr));
|
||||
}
|
||||
|
||||
public Address instructionsEnd() {
|
||||
public Address contentEnd() {
|
||||
return headerBegin().addOffsetTo(dataOffsetField.getValue(addr));
|
||||
}
|
||||
|
||||
public Address codeBegin() {
|
||||
return headerBegin().addOffsetTo(contentOffsetField.getValue(addr));
|
||||
}
|
||||
|
||||
public Address codeEnd() {
|
||||
return headerBegin().addOffsetTo(dataOffsetField.getValue(addr));
|
||||
}
|
||||
|
||||
@ -128,24 +138,27 @@ public class CodeBlob extends VMObject {
|
||||
}
|
||||
|
||||
// Offsets
|
||||
public int getRelocationOffset() { return (int) headerSizeField.getValue(addr); }
|
||||
public int getInstructionsOffset() { return (int) instructionsOffsetField.getValue(addr); }
|
||||
public int getDataOffset() { return (int) dataOffsetField.getValue(addr); }
|
||||
public int getRelocationOffset() { return (int) headerSizeField .getValue(addr); }
|
||||
public int getContentOffset() { return (int) contentOffsetField.getValue(addr); }
|
||||
public int getCodeOffset() { return (int) codeOffsetField .getValue(addr); }
|
||||
public int getDataOffset() { return (int) dataOffsetField .getValue(addr); }
|
||||
|
||||
// Sizes
|
||||
public int getSize() { return (int) sizeField.getValue(addr); }
|
||||
public int getHeaderSize() { return (int) headerSizeField.getValue(addr); }
|
||||
public int getSize() { return (int) sizeField .getValue(addr); }
|
||||
public int getHeaderSize() { return (int) headerSizeField.getValue(addr); }
|
||||
// FIXME: add getRelocationSize()
|
||||
public int getInstructionsSize() { return (int) instructionsEnd().minus(instructionsBegin()); }
|
||||
public int getDataSize() { return (int) dataEnd().minus(dataBegin()); }
|
||||
public int getContentSize() { return (int) contentEnd().minus(contentBegin()); }
|
||||
public int getCodeSize() { return (int) codeEnd() .minus(codeBegin()); }
|
||||
public int getDataSize() { return (int) dataEnd() .minus(dataBegin()); }
|
||||
|
||||
// Containment
|
||||
public boolean blobContains(Address addr) { return headerBegin().lessThanOrEqual(addr) && dataEnd().greaterThan(addr); }
|
||||
public boolean blobContains(Address addr) { return headerBegin() .lessThanOrEqual(addr) && dataEnd() .greaterThan(addr); }
|
||||
// FIXME: add relocationContains
|
||||
public boolean instructionsContains(Address addr) { return instructionsBegin().lessThanOrEqual(addr) && instructionsEnd().greaterThan(addr); }
|
||||
public boolean dataContains(Address addr) { return dataBegin().lessThanOrEqual(addr) && dataEnd().greaterThan(addr); }
|
||||
public boolean contains(Address addr) { return instructionsContains(addr); }
|
||||
public boolean isFrameCompleteAt(Address a) { return instructionsContains(a) && a.minus(instructionsBegin()) >= frameCompleteOffsetField.getValue(addr); }
|
||||
public boolean contentContains(Address addr) { return contentBegin().lessThanOrEqual(addr) && contentEnd().greaterThan(addr); }
|
||||
public boolean codeContains(Address addr) { return codeBegin() .lessThanOrEqual(addr) && codeEnd() .greaterThan(addr); }
|
||||
public boolean dataContains(Address addr) { return dataBegin() .lessThanOrEqual(addr) && dataEnd() .greaterThan(addr); }
|
||||
public boolean contains(Address addr) { return contentContains(addr); }
|
||||
public boolean isFrameCompleteAt(Address a) { return codeContains(a) && a.minus(codeBegin()) >= frameCompleteOffsetField.getValue(addr); }
|
||||
|
||||
// Reclamation support (really only used by the nmethods, but in order to get asserts to work
|
||||
// in the CodeCache they are defined virtual here)
|
||||
@ -168,7 +181,7 @@ public class CodeBlob extends VMObject {
|
||||
if (Assert.ASSERTS_ENABLED) {
|
||||
Assert.that(getOopMaps() != null, "nope");
|
||||
}
|
||||
return getOopMaps().findMapAtOffset(pc.minus(instructionsBegin()), debugging);
|
||||
return getOopMaps().findMapAtOffset(pc.minus(codeBegin()), debugging);
|
||||
}
|
||||
|
||||
// virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, void f(oop*)) { ShouldNotReachHere(); }
|
||||
@ -200,7 +213,8 @@ public class CodeBlob extends VMObject {
|
||||
}
|
||||
|
||||
protected void printComponentsOn(PrintStream tty) {
|
||||
tty.println(" instructions: [" + instructionsBegin() + ", " + instructionsEnd() + "), " +
|
||||
tty.println(" content: [" + contentBegin() + ", " + contentEnd() + "), " +
|
||||
" code: [" + codeBegin() + ", " + codeEnd() + "), " +
|
||||
" data: [" + dataBegin() + ", " + dataEnd() + "), " +
|
||||
" frame size: " + getFrameSize());
|
||||
}
|
||||
|
@ -134,10 +134,10 @@ public class NMethod extends CodeBlob {
|
||||
public boolean isOSRMethod() { return getEntryBCI() != VM.getVM().getInvocationEntryBCI(); }
|
||||
|
||||
/** Boundaries for different parts */
|
||||
public Address constantsBegin() { return instructionsBegin(); }
|
||||
public Address constantsBegin() { return contentBegin(); }
|
||||
public Address constantsEnd() { return getEntryPoint(); }
|
||||
public Address codeBegin() { return getEntryPoint(); }
|
||||
public Address codeEnd() { return headerBegin().addOffsetTo(getStubOffset()); }
|
||||
public Address instsBegin() { return codeBegin(); }
|
||||
public Address instsEnd() { return headerBegin().addOffsetTo(getStubOffset()); }
|
||||
public Address exceptionBegin() { return headerBegin().addOffsetTo(getExceptionOffset()); }
|
||||
public Address deoptBegin() { return headerBegin().addOffsetTo(getDeoptOffset()); }
|
||||
public Address stubBegin() { return headerBegin().addOffsetTo(getStubOffset()); }
|
||||
@ -156,7 +156,7 @@ public class NMethod extends CodeBlob {
|
||||
public Address nulChkTableEnd() { return headerBegin().addOffsetTo(getNMethodEndOffset()); }
|
||||
|
||||
public int constantsSize() { return (int) constantsEnd() .minus(constantsBegin()); }
|
||||
public int codeSize() { return (int) codeEnd() .minus(codeBegin()); }
|
||||
public int instsSize() { return (int) instsEnd() .minus(instsBegin()); }
|
||||
public int stubSize() { return (int) stubEnd() .minus(stubBegin()); }
|
||||
public int oopsSize() { return (int) oopsEnd() .minus(oopsBegin()); }
|
||||
public int scopesDataSize() { return (int) scopesDataEnd() .minus(scopesDataBegin()); }
|
||||
@ -169,7 +169,7 @@ public class NMethod extends CodeBlob {
|
||||
public int totalSize() {
|
||||
return
|
||||
constantsSize() +
|
||||
codeSize() +
|
||||
instsSize() +
|
||||
stubSize() +
|
||||
scopesDataSize() +
|
||||
scopesPCsSize() +
|
||||
@ -179,7 +179,7 @@ public class NMethod extends CodeBlob {
|
||||
}
|
||||
|
||||
public boolean constantsContains (Address addr) { return constantsBegin() .lessThanOrEqual(addr) && constantsEnd() .greaterThan(addr); }
|
||||
public boolean codeContains (Address addr) { return codeBegin() .lessThanOrEqual(addr) && codeEnd() .greaterThan(addr); }
|
||||
public boolean instsContains (Address addr) { return instsBegin() .lessThanOrEqual(addr) && instsEnd() .greaterThan(addr); }
|
||||
public boolean stubContains (Address addr) { return stubBegin() .lessThanOrEqual(addr) && stubEnd() .greaterThan(addr); }
|
||||
public boolean oopsContains (Address addr) { return oopsBegin() .lessThanOrEqual(addr) && oopsEnd() .greaterThan(addr); }
|
||||
public boolean scopesDataContains (Address addr) { return scopesDataBegin() .lessThanOrEqual(addr) && scopesDataEnd() .greaterThan(addr); }
|
||||
@ -353,7 +353,8 @@ public class NMethod extends CodeBlob {
|
||||
|
||||
protected void printComponentsOn(PrintStream tty) {
|
||||
// FIXME: add relocation information
|
||||
tty.println(" instructions: [" + instructionsBegin() + ", " + instructionsEnd() + "), " +
|
||||
tty.println(" content: [" + contentBegin() + ", " + contentEnd() + "), " +
|
||||
" code: [" + codeBegin() + ", " + codeEnd() + "), " +
|
||||
" data: [" + dataBegin() + ", " + dataEnd() + "), " +
|
||||
" oops: [" + oopsBegin() + ", " + oopsEnd() + "), " +
|
||||
" frame size: " + getFrameSize());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2010, 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
|
||||
@ -75,7 +75,7 @@ public class PCDesc extends VMObject {
|
||||
}
|
||||
|
||||
public Address getRealPC(NMethod code) {
|
||||
return code.instructionsBegin().addOffsetTo(getPCOffset());
|
||||
return code.codeBegin().addOffsetTo(getPCOffset());
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2010, 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
|
||||
@ -190,11 +190,11 @@ public class FindInCodeCachePanel extends SAPanel {
|
||||
|
||||
private void reportResult(StringBuffer result, CodeBlob blob) {
|
||||
result.append("<a href='blob:");
|
||||
result.append(blob.instructionsBegin().toString());
|
||||
result.append(blob.contentBegin().toString());
|
||||
result.append("'>");
|
||||
result.append(blob.getName());
|
||||
result.append("@");
|
||||
result.append(blob.instructionsBegin());
|
||||
result.append(blob.contentBegin());
|
||||
result.append("</a><br>");
|
||||
}
|
||||
|
||||
|
@ -1415,13 +1415,13 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
|
||||
buf.append(genMethodAndKlassLink(nmethod.getMethod()));
|
||||
|
||||
buf.h3("Compiled Code");
|
||||
sun.jvm.hotspot.debugger.Address codeBegin = nmethod.codeBegin();
|
||||
sun.jvm.hotspot.debugger.Address codeEnd = nmethod.codeEnd();
|
||||
final int codeSize = (int)codeEnd.minus(codeBegin);
|
||||
final long startPc = addressToLong(codeBegin);
|
||||
final byte[] code = new byte[codeSize];
|
||||
sun.jvm.hotspot.debugger.Address instsBegin = nmethod.instsBegin();
|
||||
sun.jvm.hotspot.debugger.Address instsEnd = nmethod.instsEnd();
|
||||
final int instsSize = nmethod.instsSize();
|
||||
final long startPc = addressToLong(instsBegin);
|
||||
final byte[] code = new byte[instsSize];
|
||||
for (int i=0; i < code.length; i++)
|
||||
code[i] = codeBegin.getJByteAt(i);
|
||||
code[i] = instsBegin.getJByteAt(i);
|
||||
|
||||
final long verifiedEntryPoint = addressToLong(nmethod.getVerifiedEntryPoint());
|
||||
final long entryPoint = addressToLong(nmethod.getEntryPoint());
|
||||
@ -1499,8 +1499,8 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
|
||||
buf.h3("CodeBlob");
|
||||
|
||||
buf.h3("Compiled Code");
|
||||
final sun.jvm.hotspot.debugger.Address codeBegin = blob.instructionsBegin();
|
||||
final int codeSize = blob.getInstructionsSize();
|
||||
final sun.jvm.hotspot.debugger.Address codeBegin = blob.codeBegin();
|
||||
final int codeSize = blob.getCodeSize();
|
||||
final long startPc = addressToLong(codeBegin);
|
||||
final byte[] code = new byte[codeSize];
|
||||
for (int i=0; i < code.length; i++)
|
||||
|
@ -96,15 +96,15 @@ public class PointerFinder {
|
||||
if (Assert.ASSERTS_ENABLED) {
|
||||
Assert.that(loc.blob != null, "Should have found CodeBlob");
|
||||
}
|
||||
loc.inBlobInstructions = loc.blob.instructionsContains(a);
|
||||
loc.inBlobData = loc.blob.dataContains(a);
|
||||
loc.inBlobCode = loc.blob.codeContains(a);
|
||||
loc.inBlobData = loc.blob.dataContains(a);
|
||||
|
||||
if (loc.blob.isNMethod()) {
|
||||
NMethod nm = (NMethod) loc.blob;
|
||||
loc.inBlobOops = nm.oopsContains(a);
|
||||
}
|
||||
|
||||
loc.inBlobUnknownLocation = (!(loc.inBlobInstructions ||
|
||||
loc.inBlobUnknownLocation = (!(loc.inBlobCode ||
|
||||
loc.inBlobData ||
|
||||
loc.inBlobOops));
|
||||
return loc;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2010, 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
|
||||
@ -65,7 +65,7 @@ public class PointerLocation {
|
||||
InterpreterCodelet interpreterCodelet;
|
||||
CodeBlob blob;
|
||||
// FIXME: add more detail about CodeBlob
|
||||
boolean inBlobInstructions;
|
||||
boolean inBlobCode;
|
||||
boolean inBlobData;
|
||||
boolean inBlobOops;
|
||||
boolean inBlobUnknownLocation;
|
||||
@ -142,8 +142,8 @@ public class PointerLocation {
|
||||
return blob;
|
||||
}
|
||||
|
||||
public boolean isInBlobInstructions() {
|
||||
return inBlobInstructions;
|
||||
public boolean isInBlobCode() {
|
||||
return inBlobCode;
|
||||
}
|
||||
|
||||
public boolean isInBlobData() {
|
||||
@ -233,8 +233,8 @@ public class PointerLocation {
|
||||
} else if (isInCodeCache()) {
|
||||
CodeBlob b = getCodeBlob();
|
||||
tty.print("In ");
|
||||
if (isInBlobInstructions()) {
|
||||
tty.print("instructions");
|
||||
if (isInBlobCode()) {
|
||||
tty.print("code");
|
||||
} else if (isInBlobData()) {
|
||||
tty.print("data");
|
||||
} else if (isInBlobOops()) {
|
||||
|
@ -33,9 +33,9 @@
|
||||
# Don't put quotes (fail windows build).
|
||||
HOTSPOT_VM_COPYRIGHT=Copyright 2010
|
||||
|
||||
HS_MAJOR_VER=19
|
||||
HS_MAJOR_VER=20
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=06
|
||||
HS_BUILD_NUMBER=01
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=7
|
||||
|
@ -47,6 +47,8 @@ jprt.sync.push=false
|
||||
# Define the Solaris platforms we want for the various releases
|
||||
|
||||
jprt.my.solaris.sparc.jdk7=solaris_sparc_5.10
|
||||
jprt.my.solaris.sparc.jdk7b107=solaris_sparc_5.10
|
||||
jprt.my.solaris.sparc.jdk7temp=solaris_sparc_5.10
|
||||
jprt.my.solaris.sparc.jdk6=solaris_sparc_5.8
|
||||
jprt.my.solaris.sparc.jdk6perf=solaris_sparc_5.8
|
||||
jprt.my.solaris.sparc.jdk6u10=solaris_sparc_5.8
|
||||
@ -56,6 +58,8 @@ jprt.my.solaris.sparc.jdk6u20=solaris_sparc_5.8
|
||||
jprt.my.solaris.sparc=${jprt.my.solaris.sparc.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.solaris.sparcv9.jdk7=solaris_sparcv9_5.10
|
||||
jprt.my.solaris.sparcv9.jdk7b107=solaris_sparcv9_5.10
|
||||
jprt.my.solaris.sparcv9.jdk7temp=solaris_sparcv9_5.10
|
||||
jprt.my.solaris.sparcv9.jdk6=solaris_sparcv9_5.8
|
||||
jprt.my.solaris.sparcv9.jdk6perf=solaris_sparcv9_5.8
|
||||
jprt.my.solaris.sparcv9.jdk6u10=solaris_sparcv9_5.8
|
||||
@ -65,6 +69,8 @@ jprt.my.solaris.sparcv9.jdk6u20=solaris_sparcv9_5.8
|
||||
jprt.my.solaris.sparcv9=${jprt.my.solaris.sparcv9.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.solaris.i586.jdk7=solaris_i586_5.10
|
||||
jprt.my.solaris.i586.jdk7b107=solaris_i586_5.10
|
||||
jprt.my.solaris.i586.jdk7temp=solaris_i586_5.10
|
||||
jprt.my.solaris.i586.jdk6=solaris_i586_5.8
|
||||
jprt.my.solaris.i586.jdk6perf=solaris_i586_5.8
|
||||
jprt.my.solaris.i586.jdk6u10=solaris_i586_5.8
|
||||
@ -74,6 +80,8 @@ jprt.my.solaris.i586.jdk6u20=solaris_i586_5.8
|
||||
jprt.my.solaris.i586=${jprt.my.solaris.i586.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.solaris.x64.jdk7=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk7b107=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk7temp=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk6=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk6perf=solaris_x64_5.10
|
||||
jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
|
||||
@ -83,6 +91,8 @@ jprt.my.solaris.x64.jdk6u20=solaris_x64_5.10
|
||||
jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.linux.i586.jdk7=linux_i586_2.6
|
||||
jprt.my.linux.i586.jdk7b107=linux_i586_2.6
|
||||
jprt.my.linux.i586.jdk7temp=linux_i586_2.6
|
||||
jprt.my.linux.i586.jdk6=linux_i586_2.4
|
||||
jprt.my.linux.i586.jdk6perf=linux_i586_2.4
|
||||
jprt.my.linux.i586.jdk6u10=linux_i586_2.4
|
||||
@ -92,6 +102,8 @@ jprt.my.linux.i586.jdk6u20=linux_i586_2.4
|
||||
jprt.my.linux.i586=${jprt.my.linux.i586.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.linux.x64.jdk7=linux_x64_2.6
|
||||
jprt.my.linux.x64.jdk7b107=linux_x64_2.6
|
||||
jprt.my.linux.x64.jdk7temp=linux_x64_2.6
|
||||
jprt.my.linux.x64.jdk6=linux_x64_2.4
|
||||
jprt.my.linux.x64.jdk6perf=linux_x64_2.4
|
||||
jprt.my.linux.x64.jdk6u10=linux_x64_2.4
|
||||
@ -100,7 +112,9 @@ jprt.my.linux.x64.jdk6u18=linux_x64_2.4
|
||||
jprt.my.linux.x64.jdk6u20=linux_x64_2.4
|
||||
jprt.my.linux.x64=${jprt.my.linux.x64.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.windows.i586.jdk7=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk7=windows_i586_5.1
|
||||
jprt.my.windows.i586.jdk7b107=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk7temp=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk6=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk6perf=windows_i586_5.0
|
||||
jprt.my.windows.i586.jdk6u10=windows_i586_5.0
|
||||
@ -110,6 +124,8 @@ jprt.my.windows.i586.jdk6u20=windows_i586_5.0
|
||||
jprt.my.windows.i586=${jprt.my.windows.i586.${jprt.tools.default.release}}
|
||||
|
||||
jprt.my.windows.x64.jdk7=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk7b107=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk7temp=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk6=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk6perf=windows_x64_5.2
|
||||
jprt.my.windows.x64.jdk6u10=windows_x64_5.2
|
||||
|
@ -19,7 +19,7 @@
|
||||
# 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.
|
||||
@ -45,13 +45,13 @@
|
||||
#
|
||||
# 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:
|
||||
# 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 build before building libjvm[_g].so
|
||||
# Please refer to ./makefiles/sa.make
|
||||
# 2. libsa[_g].so - Native library for SA - This is built after
|
||||
# libjsig[_g].so (signal interposition library)
|
||||
# Please refer to ./makefiles/vm.make
|
||||
# Please refer to ./makefiles/vm.make
|
||||
# If $(GAMMADIR)/agent dir is not present, SA components are not built.
|
||||
|
||||
ifeq ($(GAMMADIR),)
|
||||
@ -61,11 +61,9 @@ include $(GAMMADIR)/make/defs.make
|
||||
endif
|
||||
include $(GAMMADIR)/make/$(OSNAME)/makefiles/rules.make
|
||||
|
||||
ifndef LP64
|
||||
ifndef CC_INTERP
|
||||
FORCE_TIERED=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef LP64
|
||||
ifeq ("$(filter $(LP64_ARCH),$(BUILDARCH))","")
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2003, 2010, 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
|
||||
@ -48,6 +48,9 @@ MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules
|
||||
AGENT_FILES1 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES1))
|
||||
AGENT_FILES2 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES2))
|
||||
|
||||
AGENT_FILES1_LIST := $(GENERATED)/agent1.classes.list
|
||||
AGENT_FILES2_LIST := $(GENERATED)/agent2.classes.list
|
||||
|
||||
SA_CLASSDIR = $(GENERATED)/saclasses
|
||||
|
||||
SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
|
||||
@ -79,10 +82,24 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
|
||||
$(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \
|
||||
mkdir -p $(SA_CLASSDIR); \
|
||||
fi
|
||||
|
||||
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1)
|
||||
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2)
|
||||
|
||||
|
||||
# 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_FILES1_LIST) $(AGENT_FILES2_LIST))
|
||||
$(foreach file,$(AGENT_FILES1),$(shell echo $(file) >> $(AGENT_FILES1_LIST)))
|
||||
$(foreach file,$(AGENT_FILES2),$(shell echo $(file) >> $(AGENT_FILES2_LIST)))
|
||||
|
||||
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES1_LIST)
|
||||
$(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES2_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
|
||||
@ -101,3 +118,4 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
|
||||
clean:
|
||||
rm -rf $(SA_CLASSDIR)
|
||||
rm -rf $(GENERATED)/sa-jdi.jar
|
||||
rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1998, 2010, 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
|
||||
@ -19,7 +19,7 @@
|
||||
# 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.
|
||||
@ -36,13 +36,13 @@
|
||||
# or BOOTDIR has to be set. We do *not* search javac, javah, rmic etc.
|
||||
# from the PATH.
|
||||
|
||||
# Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
|
||||
# JDI binding on SA produces two binaries:
|
||||
# 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 build before building libjvm[_g].so
|
||||
# Please refer to ./makefiles/sa.make
|
||||
# 2. libsaproc[_g].so - Native library for SA - This is built after
|
||||
# libjsig[_g].so (signal interposition library)
|
||||
# Please refer to ./makefiles/vm.make
|
||||
# Please refer to ./makefiles/vm.make
|
||||
# If $(GAMMADIR)/agent dir is not present, SA components are not built.
|
||||
|
||||
ifeq ($(GAMMADIR),)
|
||||
@ -52,11 +52,9 @@ include $(GAMMADIR)/make/defs.make
|
||||
endif
|
||||
include $(GAMMADIR)/make/$(OSNAME)/makefiles/rules.make
|
||||
|
||||
ifndef LP64
|
||||
ifndef CC_INTERP
|
||||
FORCE_TIERED=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef LP64
|
||||
ifeq ("$(filter $(LP64_ARCH),$(BUILDARCH))","")
|
||||
|
@ -165,7 +165,7 @@ $(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \
|
||||
$(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
|
||||
@echo Compiling $(DTRACE).d
|
||||
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -o $@ -s $(DTRACE).d \
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \
|
||||
$(DTraced_Files) ||\
|
||||
STATUS=$$?;\
|
||||
if [ x"$$STATUS" = x"1" -a \
|
||||
|
4477
hotspot/make/solaris/makefiles/reorder_TIERED_sparcv9
Normal file
4477
hotspot/make/solaris/makefiles/reorder_TIERED_sparcv9
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2003, 2010, 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
|
||||
@ -44,6 +44,9 @@ MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules
|
||||
AGENT_FILES1 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES1))
|
||||
AGENT_FILES2 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES2))
|
||||
|
||||
AGENT_FILES1_LIST := $(GENERATED)/agent1.classes.list
|
||||
AGENT_FILES2_LIST := $(GENERATED)/agent2.classes.list
|
||||
|
||||
SA_CLASSDIR = $(GENERATED)/saclasses
|
||||
|
||||
SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
|
||||
@ -70,8 +73,23 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
|
||||
$(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \
|
||||
mkdir -p $(SA_CLASSDIR); \
|
||||
fi
|
||||
$(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1)
|
||||
$(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2)
|
||||
|
||||
# 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_FILES1_LIST) $(AGENT_FILES2_LIST))
|
||||
$(foreach file,$(AGENT_FILES1),$(shell echo $(file) >> $(AGENT_FILES1_LIST)))
|
||||
$(foreach file,$(AGENT_FILES2),$(shell echo $(file) >> $(AGENT_FILES2_LIST)))
|
||||
|
||||
$(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES1_LIST)
|
||||
$(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES2_LIST)
|
||||
|
||||
$(QUIETLY) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
|
||||
$(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
|
||||
@ -88,3 +106,4 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
|
||||
clean:
|
||||
rm -rf $(SA_CLASSDIR)
|
||||
rm -rf $(GENERATED)/sa-jdi.jar
|
||||
rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST)
|
||||
|
@ -1,4 +1,4 @@
|
||||
Copyright %YEARS% Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) %YEARS%, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,4 +1,4 @@
|
||||
Copyright %YEARS% Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) %YEARS%, 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
Copyright %YEARS% Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) %YEARS%, 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1998, 2010, 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
|
||||
@ -19,7 +19,7 @@
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
# Note: this makefile is invoked both from build.bat and from the J2SE
|
||||
@ -72,13 +72,11 @@ BUILDARCH=ia64
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!if "$(BUILDARCH)" != "amd64"
|
||||
!if "$(BUILDARCH)" != "ia64"
|
||||
!ifndef CC_INTERP
|
||||
FORCE_TIERED=1
|
||||
!endif
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!if "$(BUILDARCH)" == "amd64"
|
||||
Platform_arch=x86
|
||||
@ -135,7 +133,7 @@ VARIANT_TEXT=Kernel
|
||||
# We can have update versions like "01a", but Windows requires
|
||||
# we use only integers in the file version field. So:
|
||||
# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
|
||||
#
|
||||
#
|
||||
JDK_UPDATE_VER=0
|
||||
JDK_BUILD_NUMBER=0
|
||||
|
||||
@ -148,7 +146,7 @@ HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM
|
||||
# 1.6.0_01a-b02 will be 6.0.11.2
|
||||
#
|
||||
# JDK_* variables are defined in make/hotspot_version or on command line
|
||||
#
|
||||
#
|
||||
JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER)
|
||||
JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER)
|
||||
!if "$(JRE_RELEASE_VERSION)" == ""
|
||||
@ -162,7 +160,7 @@ JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER)
|
||||
|
||||
# Hotspot Express VM FileVersion:
|
||||
# 10.0-b<yz> will have DLL version 10.0.0.yz (need 4 numbers).
|
||||
#
|
||||
#
|
||||
# HS_* variables are defined in make/hotspot_version
|
||||
#
|
||||
HS_VER=$(HS_MAJOR_VER),$(HS_MINOR_VER),0,$(HS_BUILD_NUMBER)
|
||||
@ -182,7 +180,7 @@ HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
|
||||
|
||||
|
||||
# We don't support SA on ia64, and we can't
|
||||
# build it if we are using a version of Vis Studio
|
||||
# build it if we are using a version of Vis Studio
|
||||
# older than .Net 2003.
|
||||
# SA_INCLUDE and SA_LIB are hold-overs from a previous
|
||||
# implementation in which we could build SA using
|
||||
|
@ -4192,7 +4192,7 @@ static void check_index(int ind) {
|
||||
|
||||
static void generate_satb_log_enqueue(bool with_frame) {
|
||||
BufferBlob* bb = BufferBlob::create("enqueue_with_frame", EnqueueCodeSize);
|
||||
CodeBuffer buf(bb->instructions_begin(), bb->instructions_size());
|
||||
CodeBuffer buf(bb);
|
||||
MacroAssembler masm(&buf);
|
||||
address start = masm.pc();
|
||||
Register pre_val;
|
||||
@ -4421,7 +4421,7 @@ static u_char* dirty_card_log_enqueue_end = 0;
|
||||
// This gets to assume that o0 contains the object address.
|
||||
static void generate_dirty_card_log_enqueue(jbyte* byte_map_base) {
|
||||
BufferBlob* bb = BufferBlob::create("dirty_card_enqueue", EnqueueCodeSize*2);
|
||||
CodeBuffer buf(bb->instructions_begin(), bb->instructions_size());
|
||||
CodeBuffer buf(bb);
|
||||
MacroAssembler masm(&buf);
|
||||
address start = masm.pc();
|
||||
|
||||
|
@ -57,13 +57,12 @@ void RangeCheckStub::emit_code(LIR_Assembler* ce) {
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef TIERED
|
||||
|
||||
void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
|
||||
__ bind(_entry);
|
||||
__ set(_bci, G4);
|
||||
__ call(Runtime1::entry_for(Runtime1::counter_overflow_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
__ delayed()->mov_or_nop(_method->as_register(), G5);
|
||||
ce->add_call_info_here(_info);
|
||||
ce->verify_oop_map(_info);
|
||||
|
||||
@ -71,7 +70,6 @@ void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
|
||||
__ delayed()->nop();
|
||||
}
|
||||
|
||||
#endif // TIERED
|
||||
|
||||
void DivByZeroStub::emit_code(LIR_Assembler* ce) {
|
||||
if (_offset != -1) {
|
||||
|
@ -73,6 +73,7 @@ FloatRegister FrameMap::_fpu_regs [FrameMap::nof_fpu_regs];
|
||||
// some useful constant RInfo's:
|
||||
LIR_Opr FrameMap::in_long_opr;
|
||||
LIR_Opr FrameMap::out_long_opr;
|
||||
LIR_Opr FrameMap::g1_long_single_opr;
|
||||
|
||||
LIR_Opr FrameMap::F0_opr;
|
||||
LIR_Opr FrameMap::F0_double_opr;
|
||||
@ -238,6 +239,7 @@ void FrameMap::initialize() {
|
||||
|
||||
in_long_opr = as_long_opr(I0);
|
||||
out_long_opr = as_long_opr(O0);
|
||||
g1_long_single_opr = as_long_single_opr(G1);
|
||||
|
||||
G0_opr = as_opr(G0);
|
||||
G1_opr = as_opr(G1);
|
||||
|
@ -103,6 +103,7 @@
|
||||
|
||||
static LIR_Opr in_long_opr;
|
||||
static LIR_Opr out_long_opr;
|
||||
static LIR_Opr g1_long_single_opr;
|
||||
|
||||
static LIR_Opr F0_opr;
|
||||
static LIR_Opr F0_double_opr;
|
||||
@ -113,18 +114,25 @@
|
||||
private:
|
||||
static FloatRegister _fpu_regs [nof_fpu_regs];
|
||||
|
||||
static LIR_Opr as_long_single_opr(Register r) {
|
||||
return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r));
|
||||
}
|
||||
static LIR_Opr as_long_pair_opr(Register r) {
|
||||
return LIR_OprFact::double_cpu(cpu_reg2rnr(r->successor()), cpu_reg2rnr(r));
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
#ifdef _LP64
|
||||
static LIR_Opr as_long_opr(Register r) {
|
||||
return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r));
|
||||
return as_long_single_opr(r);
|
||||
}
|
||||
static LIR_Opr as_pointer_opr(Register r) {
|
||||
return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r));
|
||||
return as_long_single_opr(r);
|
||||
}
|
||||
#else
|
||||
static LIR_Opr as_long_opr(Register r) {
|
||||
return LIR_OprFact::double_cpu(cpu_reg2rnr(r->successor()), cpu_reg2rnr(r));
|
||||
return as_long_pair_opr(r);
|
||||
}
|
||||
static LIR_Opr as_pointer_opr(Register r) {
|
||||
return as_opr(r);
|
||||
|
@ -1625,13 +1625,18 @@ void LIR_Assembler::reg2mem(LIR_Opr from_reg, LIR_Opr dest, BasicType type,
|
||||
|
||||
void LIR_Assembler::return_op(LIR_Opr result) {
|
||||
// the poll may need a register so just pick one that isn't the return register
|
||||
#ifdef TIERED
|
||||
#if defined(TIERED) && !defined(_LP64)
|
||||
if (result->type_field() == LIR_OprDesc::long_type) {
|
||||
// Must move the result to G1
|
||||
// Must leave proper result in O0,O1 and G1 (TIERED only)
|
||||
__ sllx(I0, 32, G1); // Shift bits into high G1
|
||||
__ srl (I1, 0, I1); // Zero extend O1 (harmless?)
|
||||
__ or3 (I1, G1, G1); // OR 64 bits into G1
|
||||
#ifdef ASSERT
|
||||
// mangle it so any problems will show up
|
||||
__ set(0xdeadbeef, I0);
|
||||
__ set(0xdeadbeef, I1);
|
||||
#endif
|
||||
}
|
||||
#endif // TIERED
|
||||
__ set((intptr_t)os::get_polling_page(), L0);
|
||||
@ -2424,6 +2429,192 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::type_profile_helper(Register mdo, int mdo_offset_bias,
|
||||
ciMethodData *md, ciProfileData *data,
|
||||
Register recv, Register tmp1, Label* update_done) {
|
||||
uint i;
|
||||
for (i = 0; i < VirtualCallData::row_limit(); i++) {
|
||||
Label next_test;
|
||||
// See if the receiver is receiver[n].
|
||||
Address receiver_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ ld_ptr(receiver_addr, tmp1);
|
||||
__ verify_oop(tmp1);
|
||||
__ cmp(recv, tmp1);
|
||||
__ brx(Assembler::notEqual, false, Assembler::pt, next_test);
|
||||
__ delayed()->nop();
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ ld_ptr(data_addr, tmp1);
|
||||
__ add(tmp1, DataLayout::counter_increment, tmp1);
|
||||
__ st_ptr(tmp1, data_addr);
|
||||
__ ba(false, *update_done);
|
||||
__ delayed()->nop();
|
||||
__ bind(next_test);
|
||||
}
|
||||
|
||||
// Didn't find receiver; find next empty slot and fill it in
|
||||
for (i = 0; i < VirtualCallData::row_limit(); i++) {
|
||||
Label next_test;
|
||||
Address recv_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
load(recv_addr, tmp1, T_OBJECT);
|
||||
__ br_notnull(tmp1, false, Assembler::pt, next_test);
|
||||
__ delayed()->nop();
|
||||
__ st_ptr(recv, recv_addr);
|
||||
__ set(DataLayout::counter_increment, tmp1);
|
||||
__ st_ptr(tmp1, mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ ba(false, *update_done);
|
||||
__ delayed()->nop();
|
||||
__ bind(next_test);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::setup_md_access(ciMethod* method, int bci,
|
||||
ciMethodData*& md, ciProfileData*& data, int& mdo_offset_bias) {
|
||||
md = method->method_data();
|
||||
if (md == NULL) {
|
||||
bailout("out of memory building methodDataOop");
|
||||
return;
|
||||
}
|
||||
data = md->bci_to_data(bci);
|
||||
assert(data != NULL, "need data for checkcast");
|
||||
assert(data->is_ReceiverTypeData(), "need ReceiverTypeData for type check");
|
||||
if (!Assembler::is_simm13(md->byte_offset_of_slot(data, DataLayout::header_offset()) + data->size_in_bytes())) {
|
||||
// The offset is large so bias the mdo by the base of the slot so
|
||||
// that the ld can use simm13s to reference the slots of the data
|
||||
mdo_offset_bias = md->byte_offset_of_slot(data, DataLayout::header_offset());
|
||||
}
|
||||
}
|
||||
|
||||
void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, Label* failure, Label* obj_is_null) {
|
||||
// we always need a stub for the failure case.
|
||||
CodeStub* stub = op->stub();
|
||||
Register obj = op->object()->as_register();
|
||||
Register k_RInfo = op->tmp1()->as_register();
|
||||
Register klass_RInfo = op->tmp2()->as_register();
|
||||
Register dst = op->result_opr()->as_register();
|
||||
Register Rtmp1 = op->tmp3()->as_register();
|
||||
ciKlass* k = op->klass();
|
||||
|
||||
|
||||
if (obj == k_RInfo) {
|
||||
k_RInfo = klass_RInfo;
|
||||
klass_RInfo = obj;
|
||||
}
|
||||
|
||||
ciMethodData* md;
|
||||
ciProfileData* data;
|
||||
int mdo_offset_bias = 0;
|
||||
if (op->should_profile()) {
|
||||
ciMethod* method = op->profiled_method();
|
||||
assert(method != NULL, "Should have method");
|
||||
setup_md_access(method, op->profiled_bci(), md, data, mdo_offset_bias);
|
||||
|
||||
Label not_null;
|
||||
__ br_notnull(obj, false, Assembler::pn, not_null);
|
||||
__ delayed()->nop();
|
||||
Register mdo = k_RInfo;
|
||||
Register data_val = Rtmp1;
|
||||
jobject2reg(md->constant_encoding(), mdo);
|
||||
if (mdo_offset_bias > 0) {
|
||||
__ set(mdo_offset_bias, data_val);
|
||||
__ add(mdo, data_val, mdo);
|
||||
}
|
||||
Address flags_addr(mdo, md->byte_offset_of_slot(data, DataLayout::flags_offset()) - mdo_offset_bias);
|
||||
__ ldub(flags_addr, data_val);
|
||||
__ or3(data_val, BitData::null_seen_byte_constant(), data_val);
|
||||
__ stb(data_val, flags_addr);
|
||||
__ ba(false, *obj_is_null);
|
||||
__ delayed()->nop();
|
||||
__ bind(not_null);
|
||||
} else {
|
||||
__ br_null(obj, false, Assembler::pn, *obj_is_null);
|
||||
__ delayed()->nop();
|
||||
}
|
||||
|
||||
Label profile_cast_failure, profile_cast_success;
|
||||
Label *failure_target = op->should_profile() ? &profile_cast_failure : failure;
|
||||
Label *success_target = op->should_profile() ? &profile_cast_success : success;
|
||||
|
||||
// patching may screw with our temporaries on sparc,
|
||||
// so let's do it before loading the class
|
||||
if (k->is_loaded()) {
|
||||
jobject2reg(k->constant_encoding(), k_RInfo);
|
||||
} else {
|
||||
jobject2reg_with_patching(k_RInfo, op->info_for_patch());
|
||||
}
|
||||
assert(obj != k_RInfo, "must be different");
|
||||
|
||||
// get object class
|
||||
// not a safepoint as obj null check happens earlier
|
||||
load(obj, oopDesc::klass_offset_in_bytes(), klass_RInfo, T_OBJECT, NULL);
|
||||
if (op->fast_check()) {
|
||||
assert_different_registers(klass_RInfo, k_RInfo);
|
||||
__ cmp(k_RInfo, klass_RInfo);
|
||||
__ brx(Assembler::notEqual, false, Assembler::pt, *failure_target);
|
||||
__ delayed()->nop();
|
||||
} else {
|
||||
bool need_slow_path = true;
|
||||
if (k->is_loaded()) {
|
||||
if (k->super_check_offset() != sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes())
|
||||
need_slow_path = false;
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, noreg,
|
||||
(need_slow_path ? success_target : NULL),
|
||||
failure_target, NULL,
|
||||
RegisterOrConstant(k->super_check_offset()));
|
||||
} else {
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, O7, success_target,
|
||||
failure_target, NULL);
|
||||
}
|
||||
if (need_slow_path) {
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
assert(klass_RInfo == G3 && k_RInfo == G1, "incorrect call setup");
|
||||
__ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
__ cmp(G3, 0);
|
||||
__ br(Assembler::equal, false, Assembler::pn, *failure_target);
|
||||
__ delayed()->nop();
|
||||
// Fall through to success case
|
||||
}
|
||||
}
|
||||
|
||||
if (op->should_profile()) {
|
||||
Register mdo = klass_RInfo, recv = k_RInfo, tmp1 = Rtmp1;
|
||||
assert_different_registers(obj, mdo, recv, tmp1);
|
||||
__ bind(profile_cast_success);
|
||||
jobject2reg(md->constant_encoding(), mdo);
|
||||
if (mdo_offset_bias > 0) {
|
||||
__ set(mdo_offset_bias, tmp1);
|
||||
__ add(mdo, tmp1, mdo);
|
||||
}
|
||||
load(Address(obj, oopDesc::klass_offset_in_bytes()), recv, T_OBJECT);
|
||||
type_profile_helper(mdo, mdo_offset_bias, md, data, recv, tmp1, success);
|
||||
// Jump over the failure case
|
||||
__ ba(false, *success);
|
||||
__ delayed()->nop();
|
||||
// Cast failure case
|
||||
__ bind(profile_cast_failure);
|
||||
jobject2reg(md->constant_encoding(), mdo);
|
||||
if (mdo_offset_bias > 0) {
|
||||
__ set(mdo_offset_bias, tmp1);
|
||||
__ add(mdo, tmp1, mdo);
|
||||
}
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()) - mdo_offset_bias);
|
||||
__ ld_ptr(data_addr, tmp1);
|
||||
__ sub(tmp1, DataLayout::counter_increment, tmp1);
|
||||
__ st_ptr(tmp1, data_addr);
|
||||
__ ba(false, *failure);
|
||||
__ delayed()->nop();
|
||||
}
|
||||
__ ba(false, *success);
|
||||
__ delayed()->nop();
|
||||
}
|
||||
|
||||
void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
LIR_Code code = op->code();
|
||||
if (code == lir_store_check) {
|
||||
@ -2434,193 +2625,106 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
Register Rtmp1 = op->tmp3()->as_register();
|
||||
|
||||
__ verify_oop(value);
|
||||
|
||||
CodeStub* stub = op->stub();
|
||||
Label done;
|
||||
__ cmp(value, 0);
|
||||
__ br(Assembler::equal, false, Assembler::pn, done);
|
||||
__ delayed()->nop();
|
||||
// check if it needs to be profiled
|
||||
ciMethodData* md;
|
||||
ciProfileData* data;
|
||||
int mdo_offset_bias = 0;
|
||||
if (op->should_profile()) {
|
||||
ciMethod* method = op->profiled_method();
|
||||
assert(method != NULL, "Should have method");
|
||||
setup_md_access(method, op->profiled_bci(), md, data, mdo_offset_bias);
|
||||
}
|
||||
Label profile_cast_success, profile_cast_failure, done;
|
||||
Label *success_target = op->should_profile() ? &profile_cast_success : &done;
|
||||
Label *failure_target = op->should_profile() ? &profile_cast_failure : stub->entry();
|
||||
|
||||
if (op->should_profile()) {
|
||||
Label not_null;
|
||||
__ br_notnull(value, false, Assembler::pn, not_null);
|
||||
__ delayed()->nop();
|
||||
Register mdo = k_RInfo;
|
||||
Register data_val = Rtmp1;
|
||||
jobject2reg(md->constant_encoding(), mdo);
|
||||
if (mdo_offset_bias > 0) {
|
||||
__ set(mdo_offset_bias, data_val);
|
||||
__ add(mdo, data_val, mdo);
|
||||
}
|
||||
Address flags_addr(mdo, md->byte_offset_of_slot(data, DataLayout::flags_offset()) - mdo_offset_bias);
|
||||
__ ldub(flags_addr, data_val);
|
||||
__ or3(data_val, BitData::null_seen_byte_constant(), data_val);
|
||||
__ stb(data_val, flags_addr);
|
||||
__ ba(false, done);
|
||||
__ delayed()->nop();
|
||||
__ bind(not_null);
|
||||
} else {
|
||||
__ br_null(value, false, Assembler::pn, done);
|
||||
__ delayed()->nop();
|
||||
}
|
||||
load(array, oopDesc::klass_offset_in_bytes(), k_RInfo, T_OBJECT, op->info_for_exception());
|
||||
load(value, oopDesc::klass_offset_in_bytes(), klass_RInfo, T_OBJECT, NULL);
|
||||
|
||||
// get instance klass
|
||||
load(k_RInfo, objArrayKlass::element_klass_offset_in_bytes() + sizeof(oopDesc), k_RInfo, T_OBJECT, NULL);
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, O7, &done, stub->entry(), NULL);
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, O7, success_target, failure_target, NULL);
|
||||
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
assert(klass_RInfo == G3 && k_RInfo == G1, "incorrect call setup");
|
||||
__ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
__ cmp(G3, 0);
|
||||
__ br(Assembler::equal, false, Assembler::pn, *stub->entry());
|
||||
__ br(Assembler::equal, false, Assembler::pn, *failure_target);
|
||||
__ delayed()->nop();
|
||||
__ bind(done);
|
||||
} else if (op->code() == lir_checkcast) {
|
||||
// we always need a stub for the failure case.
|
||||
CodeStub* stub = op->stub();
|
||||
Register obj = op->object()->as_register();
|
||||
Register k_RInfo = op->tmp1()->as_register();
|
||||
Register klass_RInfo = op->tmp2()->as_register();
|
||||
Register dst = op->result_opr()->as_register();
|
||||
Register Rtmp1 = op->tmp3()->as_register();
|
||||
ciKlass* k = op->klass();
|
||||
// fall through to the success case
|
||||
|
||||
if (obj == k_RInfo) {
|
||||
k_RInfo = klass_RInfo;
|
||||
klass_RInfo = obj;
|
||||
}
|
||||
if (op->profiled_method() != NULL) {
|
||||
ciMethod* method = op->profiled_method();
|
||||
int bci = op->profiled_bci();
|
||||
|
||||
// We need two temporaries to perform this operation on SPARC,
|
||||
// so to keep things simple we perform a redundant test here
|
||||
Label profile_done;
|
||||
__ cmp(obj, 0);
|
||||
__ br(Assembler::notEqual, false, Assembler::pn, profile_done);
|
||||
__ delayed()->nop();
|
||||
// Object is null; update methodDataOop
|
||||
ciMethodData* md = method->method_data();
|
||||
if (md == NULL) {
|
||||
bailout("out of memory building methodDataOop");
|
||||
return;
|
||||
}
|
||||
ciProfileData* data = md->bci_to_data(bci);
|
||||
assert(data != NULL, "need data for checkcast");
|
||||
assert(data->is_BitData(), "need BitData for checkcast");
|
||||
Register mdo = k_RInfo;
|
||||
Register data_val = Rtmp1;
|
||||
if (op->should_profile()) {
|
||||
Register mdo = klass_RInfo, recv = k_RInfo, tmp1 = Rtmp1;
|
||||
assert_different_registers(value, mdo, recv, tmp1);
|
||||
__ bind(profile_cast_success);
|
||||
jobject2reg(md->constant_encoding(), mdo);
|
||||
|
||||
int mdo_offset_bias = 0;
|
||||
if (!Assembler::is_simm13(md->byte_offset_of_slot(data, DataLayout::header_offset()) + data->size_in_bytes())) {
|
||||
// The offset is large so bias the mdo by the base of the slot so
|
||||
// that the ld can use simm13s to reference the slots of the data
|
||||
mdo_offset_bias = md->byte_offset_of_slot(data, DataLayout::header_offset());
|
||||
__ set(mdo_offset_bias, data_val);
|
||||
__ add(mdo, data_val, mdo);
|
||||
if (mdo_offset_bias > 0) {
|
||||
__ set(mdo_offset_bias, tmp1);
|
||||
__ add(mdo, tmp1, mdo);
|
||||
}
|
||||
|
||||
|
||||
Address flags_addr(mdo, md->byte_offset_of_slot(data, DataLayout::flags_offset()) - mdo_offset_bias);
|
||||
__ ldub(flags_addr, data_val);
|
||||
__ or3(data_val, BitData::null_seen_byte_constant(), data_val);
|
||||
__ stb(data_val, flags_addr);
|
||||
__ bind(profile_done);
|
||||
}
|
||||
|
||||
Label done;
|
||||
// patching may screw with our temporaries on sparc,
|
||||
// so let's do it before loading the class
|
||||
if (k->is_loaded()) {
|
||||
jobject2reg(k->constant_encoding(), k_RInfo);
|
||||
} else {
|
||||
jobject2reg_with_patching(k_RInfo, op->info_for_patch());
|
||||
}
|
||||
assert(obj != k_RInfo, "must be different");
|
||||
__ cmp(obj, 0);
|
||||
__ br(Assembler::equal, false, Assembler::pn, done);
|
||||
__ delayed()->nop();
|
||||
|
||||
// get object class
|
||||
// not a safepoint as obj null check happens earlier
|
||||
load(obj, oopDesc::klass_offset_in_bytes(), klass_RInfo, T_OBJECT, NULL);
|
||||
if (op->fast_check()) {
|
||||
assert_different_registers(klass_RInfo, k_RInfo);
|
||||
__ cmp(k_RInfo, klass_RInfo);
|
||||
__ br(Assembler::notEqual, false, Assembler::pt, *stub->entry());
|
||||
load(Address(value, oopDesc::klass_offset_in_bytes()), recv, T_OBJECT);
|
||||
type_profile_helper(mdo, mdo_offset_bias, md, data, recv, tmp1, &done);
|
||||
__ ba(false, done);
|
||||
__ delayed()->nop();
|
||||
__ bind(done);
|
||||
} else {
|
||||
bool need_slow_path = true;
|
||||
if (k->is_loaded()) {
|
||||
if (k->super_check_offset() != sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes())
|
||||
need_slow_path = false;
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, noreg,
|
||||
(need_slow_path ? &done : NULL),
|
||||
stub->entry(), NULL,
|
||||
RegisterOrConstant(k->super_check_offset()));
|
||||
} else {
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, O7,
|
||||
&done, stub->entry(), NULL);
|
||||
// Cast failure case
|
||||
__ bind(profile_cast_failure);
|
||||
jobject2reg(md->constant_encoding(), mdo);
|
||||
if (mdo_offset_bias > 0) {
|
||||
__ set(mdo_offset_bias, tmp1);
|
||||
__ add(mdo, tmp1, mdo);
|
||||
}
|
||||
if (need_slow_path) {
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
assert(klass_RInfo == G3 && k_RInfo == G1, "incorrect call setup");
|
||||
__ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
__ cmp(G3, 0);
|
||||
__ br(Assembler::equal, false, Assembler::pn, *stub->entry());
|
||||
__ delayed()->nop();
|
||||
}
|
||||
__ bind(done);
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()) - mdo_offset_bias);
|
||||
__ ld_ptr(data_addr, tmp1);
|
||||
__ sub(tmp1, DataLayout::counter_increment, tmp1);
|
||||
__ st_ptr(tmp1, data_addr);
|
||||
__ ba(false, *stub->entry());
|
||||
__ delayed()->nop();
|
||||
}
|
||||
__ bind(done);
|
||||
} else if (code == lir_checkcast) {
|
||||
Register obj = op->object()->as_register();
|
||||
Register dst = op->result_opr()->as_register();
|
||||
Label success;
|
||||
emit_typecheck_helper(op, &success, op->stub()->entry(), &success);
|
||||
__ bind(success);
|
||||
__ mov(obj, dst);
|
||||
} else if (code == lir_instanceof) {
|
||||
Register obj = op->object()->as_register();
|
||||
Register k_RInfo = op->tmp1()->as_register();
|
||||
Register klass_RInfo = op->tmp2()->as_register();
|
||||
Register dst = op->result_opr()->as_register();
|
||||
Register Rtmp1 = op->tmp3()->as_register();
|
||||
ciKlass* k = op->klass();
|
||||
|
||||
Label done;
|
||||
if (obj == k_RInfo) {
|
||||
k_RInfo = klass_RInfo;
|
||||
klass_RInfo = obj;
|
||||
}
|
||||
// patching may screw with our temporaries on sparc,
|
||||
// so let's do it before loading the class
|
||||
if (k->is_loaded()) {
|
||||
jobject2reg(k->constant_encoding(), k_RInfo);
|
||||
} else {
|
||||
jobject2reg_with_patching(k_RInfo, op->info_for_patch());
|
||||
}
|
||||
assert(obj != k_RInfo, "must be different");
|
||||
__ cmp(obj, 0);
|
||||
__ br(Assembler::equal, true, Assembler::pn, done);
|
||||
__ delayed()->set(0, dst);
|
||||
|
||||
// get object class
|
||||
// not a safepoint as obj null check happens earlier
|
||||
load(obj, oopDesc::klass_offset_in_bytes(), klass_RInfo, T_OBJECT, NULL);
|
||||
if (op->fast_check()) {
|
||||
__ cmp(k_RInfo, klass_RInfo);
|
||||
__ br(Assembler::equal, true, Assembler::pt, done);
|
||||
__ delayed()->set(1, dst);
|
||||
__ set(0, dst);
|
||||
__ bind(done);
|
||||
} else {
|
||||
bool need_slow_path = true;
|
||||
if (k->is_loaded()) {
|
||||
if (k->super_check_offset() != sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes())
|
||||
need_slow_path = false;
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, O7, noreg,
|
||||
(need_slow_path ? &done : NULL),
|
||||
(need_slow_path ? &done : NULL), NULL,
|
||||
RegisterOrConstant(k->super_check_offset()),
|
||||
dst);
|
||||
} else {
|
||||
assert(dst != klass_RInfo && dst != k_RInfo, "need 3 registers");
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, O7, dst,
|
||||
&done, &done, NULL,
|
||||
RegisterOrConstant(-1),
|
||||
dst);
|
||||
}
|
||||
if (need_slow_path) {
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
assert(klass_RInfo == G3 && k_RInfo == G1, "incorrect call setup");
|
||||
__ call(Runtime1::entry_for(Runtime1::slow_subtype_check_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
__ mov(G3, dst);
|
||||
}
|
||||
__ bind(done);
|
||||
}
|
||||
Label success, failure, done;
|
||||
emit_typecheck_helper(op, &success, &failure, &failure);
|
||||
__ bind(failure);
|
||||
__ set(0, dst);
|
||||
__ ba(false, done);
|
||||
__ delayed()->nop();
|
||||
__ bind(success);
|
||||
__ set(1, dst);
|
||||
__ bind(done);
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
@ -2776,9 +2880,14 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
ciProfileData* data = md->bci_to_data(bci);
|
||||
assert(data->is_CounterData(), "need CounterData for calls");
|
||||
assert(op->mdo()->is_single_cpu(), "mdo must be allocated");
|
||||
assert(op->tmp1()->is_single_cpu(), "tmp1 must be allocated");
|
||||
Register mdo = op->mdo()->as_register();
|
||||
#ifdef _LP64
|
||||
assert(op->tmp1()->is_double_cpu(), "tmp1 must be allocated");
|
||||
Register tmp1 = op->tmp1()->as_register_lo();
|
||||
#else
|
||||
assert(op->tmp1()->is_single_cpu(), "tmp1 must be allocated");
|
||||
Register tmp1 = op->tmp1()->as_register();
|
||||
#endif
|
||||
jobject2reg(md->constant_encoding(), mdo);
|
||||
int mdo_offset_bias = 0;
|
||||
if (!Assembler::is_simm13(md->byte_offset_of_slot(data, CounterData::count_offset()) +
|
||||
@ -2795,13 +2904,13 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
// Perform additional virtual call profiling for invokevirtual and
|
||||
// invokeinterface bytecodes
|
||||
if ((bc == Bytecodes::_invokevirtual || bc == Bytecodes::_invokeinterface) &&
|
||||
Tier1ProfileVirtualCalls) {
|
||||
C1ProfileVirtualCalls) {
|
||||
assert(op->recv()->is_single_cpu(), "recv must be allocated");
|
||||
Register recv = op->recv()->as_register();
|
||||
assert_different_registers(mdo, tmp1, recv);
|
||||
assert(data->is_VirtualCallData(), "need VirtualCallData for virtual calls");
|
||||
ciKlass* known_klass = op->known_holder();
|
||||
if (Tier1OptimizeVirtualCallProfiling && known_klass != NULL) {
|
||||
if (C1OptimizeVirtualCallProfiling && known_klass != NULL) {
|
||||
// We know the type that will be seen at this call site; we can
|
||||
// statically update the methodDataOop rather than needing to do
|
||||
// dynamic tests on the receiver type
|
||||
@ -2816,9 +2925,9 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data,
|
||||
VirtualCallData::receiver_count_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ lduw(data_addr, tmp1);
|
||||
__ ld_ptr(data_addr, tmp1);
|
||||
__ add(tmp1, DataLayout::counter_increment, tmp1);
|
||||
__ stw(tmp1, data_addr);
|
||||
__ st_ptr(tmp1, data_addr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -2837,70 +2946,32 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
__ st_ptr(tmp1, recv_addr);
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ lduw(data_addr, tmp1);
|
||||
__ ld_ptr(data_addr, tmp1);
|
||||
__ add(tmp1, DataLayout::counter_increment, tmp1);
|
||||
__ stw(tmp1, data_addr);
|
||||
__ st_ptr(tmp1, data_addr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
load(Address(recv, oopDesc::klass_offset_in_bytes()), recv, T_OBJECT);
|
||||
Label update_done;
|
||||
uint i;
|
||||
for (i = 0; i < VirtualCallData::row_limit(); i++) {
|
||||
Label next_test;
|
||||
// See if the receiver is receiver[n].
|
||||
Address receiver_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ ld_ptr(receiver_addr, tmp1);
|
||||
__ verify_oop(tmp1);
|
||||
__ cmp(recv, tmp1);
|
||||
__ brx(Assembler::notEqual, false, Assembler::pt, next_test);
|
||||
__ delayed()->nop();
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ lduw(data_addr, tmp1);
|
||||
__ add(tmp1, DataLayout::counter_increment, tmp1);
|
||||
__ stw(tmp1, data_addr);
|
||||
__ br(Assembler::always, false, Assembler::pt, update_done);
|
||||
__ delayed()->nop();
|
||||
__ bind(next_test);
|
||||
}
|
||||
|
||||
// Didn't find receiver; find next empty slot and fill it in
|
||||
for (i = 0; i < VirtualCallData::row_limit(); i++) {
|
||||
Label next_test;
|
||||
Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
load(recv_addr, tmp1, T_OBJECT);
|
||||
__ tst(tmp1);
|
||||
__ brx(Assembler::notEqual, false, Assembler::pt, next_test);
|
||||
__ delayed()->nop();
|
||||
__ st_ptr(recv, recv_addr);
|
||||
__ set(DataLayout::counter_increment, tmp1);
|
||||
__ st_ptr(tmp1, mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)) -
|
||||
mdo_offset_bias);
|
||||
__ br(Assembler::always, false, Assembler::pt, update_done);
|
||||
__ delayed()->nop();
|
||||
__ bind(next_test);
|
||||
}
|
||||
type_profile_helper(mdo, mdo_offset_bias, md, data, recv, tmp1, &update_done);
|
||||
// Receiver did not match any saved receiver and there is no empty row for it.
|
||||
// Increment total counter to indicate polymorphic case.
|
||||
__ lduw(counter_addr, tmp1);
|
||||
__ ld_ptr(counter_addr, tmp1);
|
||||
__ add(tmp1, DataLayout::counter_increment, tmp1);
|
||||
__ stw(tmp1, counter_addr);
|
||||
__ st_ptr(tmp1, counter_addr);
|
||||
|
||||
__ bind(update_done);
|
||||
}
|
||||
} else {
|
||||
// Static call
|
||||
__ lduw(counter_addr, tmp1);
|
||||
__ ld_ptr(counter_addr, tmp1);
|
||||
__ add(tmp1, DataLayout::counter_increment, tmp1);
|
||||
__ stw(tmp1, counter_addr);
|
||||
__ st_ptr(tmp1, counter_addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::align_backward_branch_target() {
|
||||
__ align(OptoLoopAlignment);
|
||||
}
|
||||
@ -3093,31 +3164,36 @@ void LIR_Assembler::membar_release() {
|
||||
// no-op on TSO
|
||||
}
|
||||
|
||||
// Macro to Pack two sequential registers containing 32 bit values
|
||||
// Pack two sequential registers containing 32 bit values
|
||||
// into a single 64 bit register.
|
||||
// rs and rs->successor() are packed into rd
|
||||
// rd and rs may be the same register.
|
||||
// Note: rs and rs->successor() are destroyed.
|
||||
void LIR_Assembler::pack64( Register rs, Register rd ) {
|
||||
// src and src->successor() are packed into dst
|
||||
// src and dst may be the same register.
|
||||
// Note: src is destroyed
|
||||
void LIR_Assembler::pack64(LIR_Opr src, LIR_Opr dst) {
|
||||
Register rs = src->as_register();
|
||||
Register rd = dst->as_register_lo();
|
||||
__ sllx(rs, 32, rs);
|
||||
__ srl(rs->successor(), 0, rs->successor());
|
||||
__ or3(rs, rs->successor(), rd);
|
||||
}
|
||||
|
||||
// Macro to unpack a 64 bit value in a register into
|
||||
// Unpack a 64 bit value in a register into
|
||||
// two sequential registers.
|
||||
// rd is unpacked into rd and rd->successor()
|
||||
void LIR_Assembler::unpack64( Register rd ) {
|
||||
__ mov(rd, rd->successor());
|
||||
__ srax(rd, 32, rd);
|
||||
__ sra(rd->successor(), 0, rd->successor());
|
||||
// src is unpacked into dst and dst->successor()
|
||||
void LIR_Assembler::unpack64(LIR_Opr src, LIR_Opr dst) {
|
||||
Register rs = src->as_register_lo();
|
||||
Register rd = dst->as_register_hi();
|
||||
assert_different_registers(rs, rd, rd->successor());
|
||||
__ srlx(rs, 32, rd);
|
||||
__ srl (rs, 0, rd->successor());
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::leal(LIR_Opr addr_opr, LIR_Opr dest) {
|
||||
LIR_Address* addr = addr_opr->as_address_ptr();
|
||||
assert(addr->index()->is_illegal() && addr->scale() == LIR_Address::times_1 && Assembler::is_simm13(addr->disp()), "can't handle complex addresses yet");
|
||||
__ add(addr->base()->as_register(), addr->disp(), dest->as_register());
|
||||
|
||||
__ add(addr->base()->as_pointer_register(), addr->disp(), dest->as_pointer_register());
|
||||
}
|
||||
|
||||
|
||||
@ -3188,11 +3264,36 @@ void LIR_Assembler::peephole(LIR_List* lir) {
|
||||
tty->cr();
|
||||
}
|
||||
#endif
|
||||
continue;
|
||||
} else {
|
||||
LIR_Op* delay_op = new LIR_OpDelay(new LIR_Op0(lir_nop), op->as_OpJavaCall()->info());
|
||||
inst->insert_before(i + 1, delay_op);
|
||||
i++;
|
||||
}
|
||||
|
||||
LIR_Op* delay_op = new LIR_OpDelay(new LIR_Op0(lir_nop), op->as_OpJavaCall()->info());
|
||||
inst->insert_before(i + 1, delay_op);
|
||||
#if defined(TIERED) && !defined(_LP64)
|
||||
// fixup the return value from G1 to O0/O1 for long returns.
|
||||
// It's done here instead of in LIRGenerator because there's
|
||||
// such a mismatch between the single reg and double reg
|
||||
// calling convention.
|
||||
LIR_OpJavaCall* callop = op->as_OpJavaCall();
|
||||
if (callop->result_opr() == FrameMap::out_long_opr) {
|
||||
LIR_OpJavaCall* call;
|
||||
LIR_OprList* arguments = new LIR_OprList(callop->arguments()->length());
|
||||
for (int a = 0; a < arguments->length(); a++) {
|
||||
arguments[a] = callop->arguments()[a];
|
||||
}
|
||||
if (op->code() == lir_virtual_call) {
|
||||
call = new LIR_OpJavaCall(op->code(), callop->method(), callop->receiver(), FrameMap::g1_long_single_opr,
|
||||
callop->vtable_offset(), arguments, callop->info());
|
||||
} else {
|
||||
call = new LIR_OpJavaCall(op->code(), callop->method(), callop->receiver(), FrameMap::g1_long_single_opr,
|
||||
callop->addr(), arguments, callop->info());
|
||||
}
|
||||
inst->at_put(i - 1, call);
|
||||
inst->insert_before(i + 1, new LIR_Op1(lir_unpack64, FrameMap::g1_long_single_opr, callop->result_opr(),
|
||||
T_LONG, lir_patch_none, NULL));
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2010, 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
|
||||
@ -71,9 +71,16 @@
|
||||
|
||||
static bool is_single_instruction(LIR_Op* op);
|
||||
|
||||
// Record the type of the receiver in ReceiverTypeData
|
||||
void type_profile_helper(Register mdo, int mdo_offset_bias,
|
||||
ciMethodData *md, ciProfileData *data,
|
||||
Register recv, Register tmp1, Label* update_done);
|
||||
// Setup pointers to MDO, MDO slot, also compute offset bias to access the slot.
|
||||
void setup_md_access(ciMethod* method, int bci,
|
||||
ciMethodData*& md, ciProfileData*& data, int& mdo_offset_bias);
|
||||
public:
|
||||
void pack64( Register rs, Register rd );
|
||||
void unpack64( Register rd );
|
||||
void pack64(LIR_Opr src, LIR_Opr dst);
|
||||
void unpack64(LIR_Opr src, LIR_Opr dst);
|
||||
|
||||
enum {
|
||||
#ifdef _LP64
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2010, 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
|
||||
@ -227,29 +227,37 @@ LIR_Address* LIRGenerator::emit_array_address(LIR_Opr array_opr, LIR_Opr index_o
|
||||
}
|
||||
}
|
||||
|
||||
LIR_Opr LIRGenerator::load_immediate(int x, BasicType type) {
|
||||
LIR_Opr r;
|
||||
if (type == T_LONG) {
|
||||
r = LIR_OprFact::longConst(x);
|
||||
} else if (type == T_INT) {
|
||||
r = LIR_OprFact::intConst(x);
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
if (!Assembler::is_simm13(x)) {
|
||||
LIR_Opr tmp = new_register(type);
|
||||
__ move(r, tmp);
|
||||
return tmp;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
void LIRGenerator::increment_counter(address counter, int step) {
|
||||
void LIRGenerator::increment_counter(address counter, BasicType type, int step) {
|
||||
LIR_Opr pointer = new_pointer_register();
|
||||
__ move(LIR_OprFact::intptrConst(counter), pointer);
|
||||
LIR_Address* addr = new LIR_Address(pointer, T_INT);
|
||||
LIR_Address* addr = new LIR_Address(pointer, type);
|
||||
increment_counter(addr, step);
|
||||
}
|
||||
|
||||
void LIRGenerator::increment_counter(LIR_Address* addr, int step) {
|
||||
LIR_Opr temp = new_register(T_INT);
|
||||
LIR_Opr temp = new_register(addr->type());
|
||||
__ move(addr, temp);
|
||||
LIR_Opr c = LIR_OprFact::intConst(step);
|
||||
if (Assembler::is_simm13(step)) {
|
||||
__ add(temp, c, temp);
|
||||
} else {
|
||||
LIR_Opr temp2 = new_register(T_INT);
|
||||
__ move(c, temp2);
|
||||
__ add(temp, temp2, temp);
|
||||
}
|
||||
__ add(temp, load_immediate(step, addr->type()), temp);
|
||||
__ move(temp, addr);
|
||||
}
|
||||
|
||||
|
||||
void LIRGenerator::cmp_mem_int(LIR_Condition condition, LIR_Opr base, int disp, int c, CodeEmitInfo* info) {
|
||||
LIR_Opr o7opr = FrameMap::O7_opr;
|
||||
__ load(new LIR_Address(base, disp, T_INT), o7opr, info);
|
||||
@ -611,7 +619,6 @@ void LIRGenerator::do_CompareOp(CompareOp* x) {
|
||||
left.load_item();
|
||||
right.load_item();
|
||||
LIR_Opr reg = rlock_result(x);
|
||||
|
||||
if (x->x()->type()->is_float_kind()) {
|
||||
Bytecodes::Code code = x->op();
|
||||
__ fcmp2int(left.result(), right.result(), reg, (code == Bytecodes::_fcmpl || code == Bytecodes::_dcmpl));
|
||||
@ -1040,7 +1047,9 @@ void LIRGenerator::do_InstanceOf(InstanceOf* x) {
|
||||
LIR_Opr tmp1 = FrameMap::G1_oop_opr;
|
||||
LIR_Opr tmp2 = FrameMap::G3_oop_opr;
|
||||
LIR_Opr tmp3 = FrameMap::G4_oop_opr;
|
||||
__ instanceof(out_reg, obj.result(), x->klass(), tmp1, tmp2, tmp3, x->direct_compare(), patching_info);
|
||||
__ instanceof(out_reg, obj.result(), x->klass(), tmp1, tmp2, tmp3,
|
||||
x->direct_compare(), patching_info,
|
||||
x->profiled_method(), x->profiled_bci());
|
||||
}
|
||||
|
||||
|
||||
@ -1089,12 +1098,12 @@ void LIRGenerator::do_If(If* x) {
|
||||
// add safepoint before generating condition code so it can be recomputed
|
||||
if (x->is_safepoint()) {
|
||||
// increment backedge counter if needed
|
||||
increment_backedge_counter(state_for(x, x->state_before()));
|
||||
|
||||
increment_backedge_counter(state_for(x, x->state_before()), x->profiled_bci());
|
||||
__ safepoint(new_register(T_INT), state_for(x, x->state_before()));
|
||||
}
|
||||
|
||||
__ cmp(lir_cond(cond), left, right);
|
||||
// Generate branch profiling. Profiling code doesn't kill flags.
|
||||
profile_branch(x, cond);
|
||||
move_to_phi(x->state());
|
||||
if (x->x()->type()->is_float_kind()) {
|
||||
|
@ -465,12 +465,10 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
|
||||
break;
|
||||
|
||||
#ifdef TIERED
|
||||
case counter_overflow_id:
|
||||
// G4 contains bci
|
||||
oop_maps = generate_stub_call(sasm, noreg, CAST_FROM_FN_PTR(address, counter_overflow), G4);
|
||||
// G4 contains bci, G5 contains method
|
||||
oop_maps = generate_stub_call(sasm, noreg, CAST_FROM_FN_PTR(address, counter_overflow), G4, G5);
|
||||
break;
|
||||
#endif // TIERED
|
||||
|
||||
case new_type_array_id:
|
||||
case new_object_array_id:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2010, 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
|
||||
@ -34,14 +34,7 @@ define_pd_global(bool, ProfileTraps, false);
|
||||
define_pd_global(bool, UseOnStackReplacement, true );
|
||||
define_pd_global(bool, TieredCompilation, false);
|
||||
define_pd_global(intx, CompileThreshold, 1000 ); // Design center runs on 1.3.1
|
||||
define_pd_global(intx, Tier2CompileThreshold, 1500 );
|
||||
define_pd_global(intx, Tier3CompileThreshold, 2000 );
|
||||
define_pd_global(intx, Tier4CompileThreshold, 2500 );
|
||||
|
||||
define_pd_global(intx, BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier2BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier3BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier4BackEdgeThreshold, 100000);
|
||||
|
||||
define_pd_global(intx, OnStackReplacePercentage, 1400 );
|
||||
define_pd_global(bool, UseTLAB, true );
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2010, 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
|
||||
@ -37,21 +37,8 @@ define_pd_global(bool, ProfileInterpreter, false);
|
||||
define_pd_global(bool, ProfileInterpreter, true);
|
||||
#endif // CC_INTERP
|
||||
define_pd_global(bool, TieredCompilation, false);
|
||||
#ifdef TIERED
|
||||
define_pd_global(intx, CompileThreshold, 1000);
|
||||
define_pd_global(intx, BackEdgeThreshold, 14000);
|
||||
#else
|
||||
define_pd_global(intx, CompileThreshold, 10000);
|
||||
define_pd_global(intx, BackEdgeThreshold, 140000);
|
||||
#endif // TIERED
|
||||
|
||||
define_pd_global(intx, Tier2CompileThreshold, 10000); // unused level
|
||||
define_pd_global(intx, Tier3CompileThreshold, 10000);
|
||||
define_pd_global(intx, Tier4CompileThreshold, 40000);
|
||||
|
||||
define_pd_global(intx, Tier2BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier3BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier4BackEdgeThreshold, 100000);
|
||||
|
||||
define_pd_global(intx, OnStackReplacePercentage, 140);
|
||||
define_pd_global(intx, ConditionalMoveLimit, 4);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2010, 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
|
||||
@ -30,5 +30,5 @@ public:
|
||||
|
||||
// Heuristic for pre-packing the pt/pn bit of a predicted branch.
|
||||
bool is_backward_branch(Label& L) {
|
||||
return L.is_bound() && code_end() <= locator_address(L.loc());
|
||||
return L.is_bound() && insts_end() <= locator_address(L.loc());
|
||||
}
|
||||
|
@ -253,11 +253,12 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
}
|
||||
|
||||
// Could just be some random pointer within the codeBlob
|
||||
if (!sender.cb()->instructions_contains(sender_pc)) return false;
|
||||
if (!sender.cb()->code_contains(sender_pc)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We should never be able to see an adapter if the current frame is something from code cache
|
||||
|
||||
if ( sender_blob->is_adapter_blob()) {
|
||||
if (sender_blob->is_adapter_blob()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2010, 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
|
||||
@ -263,8 +263,7 @@
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
constantPoolCacheOop* frame::interpreter_frame_cpoolcache_addr() const;
|
||||
constantPoolCacheOop* interpreter_frame_cpoolcache_addr() const;
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
|
@ -2431,3 +2431,20 @@ void InterpreterMacroAssembler::restore_return_value( TosState state, bool is_na
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
}
|
||||
|
||||
// Jump if ((*counter_addr += increment) & mask) satisfies the condition.
|
||||
void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
|
||||
int increment, int mask,
|
||||
Register scratch1, Register scratch2,
|
||||
Condition cond, Label *where) {
|
||||
ld(counter_addr, scratch1);
|
||||
add(scratch1, increment, scratch1);
|
||||
if (is_simm13(mask)) {
|
||||
andcc(scratch1, mask, G0);
|
||||
} else {
|
||||
set(mask, scratch2);
|
||||
andcc(scratch1, scratch2, G0);
|
||||
}
|
||||
br(cond, false, Assembler::pn, *where);
|
||||
delayed()->st(scratch1, counter_addr);
|
||||
}
|
||||
|
@ -278,6 +278,10 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
void increment_mdp_data_at(Register reg, int constant,
|
||||
Register bumped_count, Register scratch2,
|
||||
bool decrement = false);
|
||||
void increment_mask_and_jump(Address counter_addr,
|
||||
int increment, int mask,
|
||||
Register scratch1, Register scratch2,
|
||||
Condition cond, Label *where);
|
||||
void set_mdp_flag_at(int flag_constant, Register scratch);
|
||||
void test_mdp_data_at(int offset, Register value, Label& not_equal_continue,
|
||||
Register scratch);
|
||||
@ -321,4 +325,5 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
|
||||
void save_return_value(TosState state, bool is_native_call);
|
||||
void restore_return_value(TosState state, bool is_native_call);
|
||||
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -50,10 +50,10 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
ResourceMark rm;
|
||||
BufferBlob* b = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
address fast_entry = b->instructions_begin();
|
||||
CodeBuffer cbuf(fast_entry, b->instructions_size());
|
||||
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
CodeBuffer cbuf(blob);
|
||||
MacroAssembler* masm = new MacroAssembler(&cbuf);
|
||||
address fast_entry = __ pc();
|
||||
|
||||
Label label1, label2;
|
||||
|
||||
@ -129,10 +129,10 @@ address JNI_FastGetField::generate_fast_get_int_field() {
|
||||
address JNI_FastGetField::generate_fast_get_long_field() {
|
||||
const char *name = "jni_fast_GetLongField";
|
||||
ResourceMark rm;
|
||||
BufferBlob* b = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
address fast_entry = b->instructions_begin();
|
||||
CodeBuffer cbuf(fast_entry, b->instructions_size());
|
||||
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
CodeBuffer cbuf(blob);
|
||||
MacroAssembler* masm = new MacroAssembler(&cbuf);
|
||||
address fast_entry = __ pc();
|
||||
|
||||
Label label1, label2;
|
||||
|
||||
@ -201,10 +201,10 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
ResourceMark rm;
|
||||
BufferBlob* b = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
address fast_entry = b->instructions_begin();
|
||||
CodeBuffer cbuf(fast_entry, b->instructions_size());
|
||||
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
CodeBuffer cbuf(blob);
|
||||
MacroAssembler* masm = new MacroAssembler(&cbuf);
|
||||
address fast_entry = __ pc();
|
||||
|
||||
Label label1, label2;
|
||||
|
||||
|
@ -193,17 +193,17 @@ void NativeCall::test() {
|
||||
|
||||
a->call( a->pc(), relocInfo::none );
|
||||
a->delayed()->nop();
|
||||
nc = nativeCall_at( cb.code_begin() );
|
||||
nc = nativeCall_at( cb.insts_begin() );
|
||||
nc->print();
|
||||
|
||||
nc = nativeCall_overwriting_at( nc->next_instruction_address() );
|
||||
for (idx = 0; idx < ARRAY_SIZE(offsets); idx++) {
|
||||
nc->set_destination( cb.code_begin() + offsets[idx] );
|
||||
assert(nc->destination() == (cb.code_begin() + offsets[idx]), "check unit test");
|
||||
nc->set_destination( cb.insts_begin() + offsets[idx] );
|
||||
assert(nc->destination() == (cb.insts_begin() + offsets[idx]), "check unit test");
|
||||
nc->print();
|
||||
}
|
||||
|
||||
nc = nativeCall_before( cb.code_begin() + 8 );
|
||||
nc = nativeCall_before( cb.insts_begin() + 8 );
|
||||
nc->print();
|
||||
|
||||
VM_Version::revert();
|
||||
@ -368,7 +368,7 @@ void NativeMovConstReg::test() {
|
||||
a->sethi(al2, O2);
|
||||
a->add(O2, al2.low10(), O2);
|
||||
|
||||
nm = nativeMovConstReg_at( cb.code_begin() );
|
||||
nm = nativeMovConstReg_at( cb.insts_begin() );
|
||||
nm->print();
|
||||
|
||||
nm = nativeMovConstReg_at( nm->next_instruction_address() );
|
||||
@ -480,7 +480,7 @@ void NativeMovConstRegPatching::test() {
|
||||
a->nop();
|
||||
a->add(O2, al2.low10(), O2);
|
||||
|
||||
nm = nativeMovConstRegPatching_at( cb.code_begin() );
|
||||
nm = nativeMovConstRegPatching_at( cb.insts_begin() );
|
||||
nm->print();
|
||||
|
||||
nm = nativeMovConstRegPatching_at( nm->next_instruction_address() );
|
||||
@ -616,7 +616,7 @@ void NativeMovRegMem::test() {
|
||||
a->sethi(al2, I3); a->add(I3, al2.low10(), I3);
|
||||
a->stf( FloatRegisterImpl::S, F15, O0, I3 ); idx++;
|
||||
|
||||
nm = nativeMovRegMem_at( cb.code_begin() );
|
||||
nm = nativeMovRegMem_at( cb.insts_begin() );
|
||||
nm->print();
|
||||
nm->set_offset( low10(0) );
|
||||
nm->print();
|
||||
@ -760,7 +760,7 @@ void NativeMovRegMemPatching::test() {
|
||||
a->sethi(al, I3); a->nop(); a->add(I3, al.low10(), I3);
|
||||
a->stf( FloatRegisterImpl::S, F15, O0, I3 ); idx++;
|
||||
|
||||
nm = nativeMovRegMemPatching_at( cb.code_begin() );
|
||||
nm = nativeMovRegMemPatching_at( cb.insts_begin() );
|
||||
nm->print();
|
||||
nm->set_offset( low10(0) );
|
||||
nm->print();
|
||||
@ -849,7 +849,7 @@ void NativeJump::test() {
|
||||
a->jmpl(I3, al.low10(), L3, RelocationHolder::none);
|
||||
a->delayed()->nop();
|
||||
|
||||
nj = nativeJump_at( cb.code_begin() );
|
||||
nj = nativeJump_at( cb.insts_begin() );
|
||||
nj->print();
|
||||
|
||||
nj = nativeJump_at( nj->next_instruction_address() );
|
||||
|
@ -3331,10 +3331,8 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
__ stf(FloatRegisterImpl::D, Freturn0, saved_Freturn0_addr);
|
||||
#if !defined(_LP64)
|
||||
#if defined(COMPILER2)
|
||||
if (!TieredCompilation) {
|
||||
// 32-bit 1-register longs return longs in G1
|
||||
__ stx(Greturn1, saved_Greturn1_addr);
|
||||
}
|
||||
// 32-bit 1-register longs return longs in G1
|
||||
__ stx(Greturn1, saved_Greturn1_addr);
|
||||
#endif
|
||||
__ set_last_Java_frame(SP, noreg);
|
||||
__ call_VM_leaf(L7_thread_cache, CAST_FROM_FN_PTR(address, Deoptimization::unpack_frames), G2_thread, G4deopt_mode);
|
||||
@ -3347,24 +3345,15 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
__ reset_last_Java_frame();
|
||||
__ ldf(FloatRegisterImpl::D, saved_Freturn0_addr, Freturn0);
|
||||
|
||||
// In tiered we never use C2 to compile methods returning longs so
|
||||
// the result is where we expect it already.
|
||||
|
||||
#if !defined(_LP64) && defined(COMPILER2)
|
||||
// In 32 bit, C2 returns longs in G1 so restore the saved G1 into
|
||||
// I0/I1 if the return value is long. In the tiered world there is
|
||||
// a mismatch between how C1 and C2 return longs compiles and so
|
||||
// currently compilation of methods which return longs is disabled
|
||||
// for C2 and so is this code. Eventually C1 and C2 will do the
|
||||
// same thing for longs in the tiered world.
|
||||
if (!TieredCompilation) {
|
||||
Label not_long;
|
||||
__ cmp(O0,T_LONG);
|
||||
__ br(Assembler::notEqual, false, Assembler::pt, not_long);
|
||||
__ delayed()->nop();
|
||||
__ ldd(saved_Greturn1_addr,I0);
|
||||
__ bind(not_long);
|
||||
}
|
||||
// I0/I1 if the return value is long.
|
||||
Label not_long;
|
||||
__ cmp(O0,T_LONG);
|
||||
__ br(Assembler::notEqual, false, Assembler::pt, not_long);
|
||||
__ delayed()->nop();
|
||||
__ ldd(saved_Greturn1_addr,I0);
|
||||
__ bind(not_long);
|
||||
#endif
|
||||
__ ret();
|
||||
__ delayed()->restore();
|
||||
|
@ -677,8 +677,7 @@ static inline void emit2_19(CodeBuffer &cbuf, int f30, int f29, int f25, int f22
|
||||
(f20 << 20) |
|
||||
(f19 << 19) |
|
||||
(f0 << 0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
}
|
||||
|
||||
// Standard Sparc opcode form2 field breakdown
|
||||
@ -689,8 +688,7 @@ static inline void emit2_22(CodeBuffer &cbuf, int f30, int f25, int f22, int f0
|
||||
(f25 << 25) |
|
||||
(f22 << 22) |
|
||||
(f0 << 0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
}
|
||||
|
||||
// Standard Sparc opcode form3 field breakdown
|
||||
@ -701,8 +699,7 @@ static inline void emit3(CodeBuffer &cbuf, int f30, int f25, int f19, int f14, i
|
||||
(f14 << 14) |
|
||||
(f5 << 5) |
|
||||
(f0 << 0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
}
|
||||
|
||||
// Standard Sparc opcode form3 field breakdown
|
||||
@ -714,8 +711,7 @@ static inline void emit3_simm13(CodeBuffer &cbuf, int f30, int f25, int f19, int
|
||||
(f14 << 14) |
|
||||
(1 << 13) | // bit to indicate immediate-mode
|
||||
(simm13<<0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
}
|
||||
|
||||
static inline void emit3_simm10(CodeBuffer &cbuf, int f30, int f25, int f19, int f14, int simm10 ) {
|
||||
@ -910,9 +906,7 @@ void emit_form3_mem_reg(CodeBuffer &cbuf, const MachNode* n, int primary, int te
|
||||
instr |= disp & 0x1FFF;
|
||||
}
|
||||
|
||||
uint *code = (uint*)cbuf.code_end();
|
||||
*code = instr;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(instr);
|
||||
|
||||
#ifdef ASSERT
|
||||
{
|
||||
@ -1532,7 +1526,7 @@ void emit_java_to_interp(CodeBuffer &cbuf ) {
|
||||
// set (empty), G5
|
||||
// jmp -1
|
||||
|
||||
address mark = cbuf.inst_mark(); // get mark within main instrs section
|
||||
address mark = cbuf.insts_mark(); // get mark within main instrs section
|
||||
|
||||
MacroAssembler _masm(&cbuf);
|
||||
|
||||
@ -1632,7 +1626,7 @@ uint size_deopt_handler() {
|
||||
// Emit exception handler code.
|
||||
int emit_exception_handler(CodeBuffer& cbuf) {
|
||||
Register temp_reg = G3;
|
||||
AddressLiteral exception_blob(OptoRuntime::exception_blob()->instructions_begin());
|
||||
AddressLiteral exception_blob(OptoRuntime::exception_blob()->entry_point());
|
||||
MacroAssembler _masm(&cbuf);
|
||||
|
||||
address base =
|
||||
@ -2292,8 +2286,7 @@ encode %{
|
||||
(0 << 13) | // select register move
|
||||
($pcc$$constant << 11) | // cc1, cc0 bits for 'icc' or 'xcc'
|
||||
($src$$reg << 0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
%}
|
||||
|
||||
enc_class enc_cmov_imm( cmpOp cmp, iRegI dst, immI11 src, immI pcc ) %{
|
||||
@ -2306,8 +2299,7 @@ encode %{
|
||||
(1 << 13) | // select immediate move
|
||||
($pcc$$constant << 11) | // cc1, cc0 bits for 'icc'
|
||||
(simm11 << 0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
%}
|
||||
|
||||
enc_class enc_cmov_reg_f( cmpOpF cmp, iRegI dst, iRegI src, flagsRegF fcc ) %{
|
||||
@ -2319,8 +2311,7 @@ encode %{
|
||||
(0 << 13) | // select register move
|
||||
($fcc$$reg << 11) | // cc1, cc0 bits for fcc0-fcc3
|
||||
($src$$reg << 0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
%}
|
||||
|
||||
enc_class enc_cmov_imm_f( cmpOp cmp, iRegI dst, immI11 src, flagsRegF fcc ) %{
|
||||
@ -2333,8 +2324,7 @@ encode %{
|
||||
(1 << 13) | // select immediate move
|
||||
($fcc$$reg << 11) | // cc1, cc0 bits for fcc0-fcc3
|
||||
(simm11 << 0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
%}
|
||||
|
||||
enc_class enc_cmovf_reg( cmpOp cmp, regD dst, regD src, immI pcc ) %{
|
||||
@ -2347,8 +2337,7 @@ encode %{
|
||||
($pcc$$constant << 11) | // cc1-cc0 bits for 'icc' or 'xcc'
|
||||
($primary << 5) | // select single, double or quad
|
||||
($src$$reg << 0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
%}
|
||||
|
||||
enc_class enc_cmovff_reg( cmpOpF cmp, flagsRegF fcc, regD dst, regD src ) %{
|
||||
@ -2360,8 +2349,7 @@ encode %{
|
||||
($fcc$$reg << 11) | // cc2-cc0 bits for 'fccX'
|
||||
($primary << 5) | // select single, double or quad
|
||||
($src$$reg << 0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
%}
|
||||
|
||||
// Used by the MIN/MAX encodings. Same as a CMOV, but
|
||||
@ -2375,8 +2363,7 @@ encode %{
|
||||
(0 << 13) | // select register move
|
||||
(0 << 11) | // cc1, cc0 bits for 'icc'
|
||||
($src$$reg << 0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
%}
|
||||
|
||||
enc_class enc_cmov_reg_minmax_long( iRegL dst, iRegL src ) %{
|
||||
@ -2388,8 +2375,7 @@ encode %{
|
||||
(0 << 13) | // select register move
|
||||
(0 << 11) | // cc1, cc0 bits for 'icc'
|
||||
($src$$reg << 0);
|
||||
*((int*)(cbuf.code_end())) = op;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32(op);
|
||||
%}
|
||||
|
||||
// Utility encoding for loading a 64 bit Pointer into a register
|
||||
@ -3055,7 +3041,7 @@ enc_class enc_Array_Equals(o0RegP ary1, o1RegP ary2, g3RegP tmp1, notemp_iRegI r
|
||||
%}
|
||||
|
||||
enc_class enc_rethrow() %{
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
Register temp_reg = G3;
|
||||
AddressLiteral rethrow_stub(OptoRuntime::rethrow_stub());
|
||||
assert(temp_reg != reg_to_register_object(R_I0_num), "temp must not break oop_reg");
|
||||
@ -3076,23 +3062,17 @@ enc_class enc_Array_Equals(o0RegP ary1, o1RegP ary2, g3RegP tmp1, notemp_iRegI r
|
||||
|
||||
enc_class emit_mem_nop() %{
|
||||
// Generates the instruction LDUXA [o6,g0],#0x82,g0
|
||||
unsigned int *code = (unsigned int*)cbuf.code_end();
|
||||
*code = (unsigned int)0xc0839040;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32((unsigned int) 0xc0839040);
|
||||
%}
|
||||
|
||||
enc_class emit_fadd_nop() %{
|
||||
// Generates the instruction FMOVS f31,f31
|
||||
unsigned int *code = (unsigned int*)cbuf.code_end();
|
||||
*code = (unsigned int)0xbfa0003f;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32((unsigned int) 0xbfa0003f);
|
||||
%}
|
||||
|
||||
enc_class emit_br_nop() %{
|
||||
// Generates the instruction BPN,PN .
|
||||
unsigned int *code = (unsigned int*)cbuf.code_end();
|
||||
*code = (unsigned int)0x00400000;
|
||||
cbuf.set_code_end(cbuf.code_end() + BytesPerInstWord);
|
||||
cbuf.insts()->emit_int32((unsigned int) 0x00400000);
|
||||
%}
|
||||
|
||||
enc_class enc_membar_acquire %{
|
||||
|
@ -1587,6 +1587,229 @@ class StubGenerator: public StubCodeGenerator {
|
||||
return start;
|
||||
}
|
||||
|
||||
//
|
||||
// Generate stub for disjoint short fill. If "aligned" is true, the
|
||||
// "to" address is assumed to be heapword aligned.
|
||||
//
|
||||
// Arguments for generated stub:
|
||||
// to: O0
|
||||
// value: O1
|
||||
// count: O2 treated as signed
|
||||
//
|
||||
address generate_fill(BasicType t, bool aligned, const char* name) {
|
||||
__ align(CodeEntryAlignment);
|
||||
StubCodeMark mark(this, "StubRoutines", name);
|
||||
address start = __ pc();
|
||||
|
||||
const Register to = O0; // source array address
|
||||
const Register value = O1; // fill value
|
||||
const Register count = O2; // elements count
|
||||
// O3 is used as a temp register
|
||||
|
||||
assert_clean_int(count, O3); // Make sure 'count' is clean int.
|
||||
|
||||
Label L_exit, L_skip_align1, L_skip_align2, L_fill_byte;
|
||||
Label L_fill_2_bytes, L_fill_elements, L_fill_32_bytes;
|
||||
|
||||
int shift = -1;
|
||||
switch (t) {
|
||||
case T_BYTE:
|
||||
shift = 2;
|
||||
break;
|
||||
case T_SHORT:
|
||||
shift = 1;
|
||||
break;
|
||||
case T_INT:
|
||||
shift = 0;
|
||||
break;
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
|
||||
BLOCK_COMMENT("Entry:");
|
||||
|
||||
if (t == T_BYTE) {
|
||||
// Zero extend value
|
||||
__ and3(value, 0xff, value);
|
||||
__ sllx(value, 8, O3);
|
||||
__ or3(value, O3, value);
|
||||
}
|
||||
if (t == T_SHORT) {
|
||||
// Zero extend value
|
||||
__ sllx(value, 48, value);
|
||||
__ srlx(value, 48, value);
|
||||
}
|
||||
if (t == T_BYTE || t == T_SHORT) {
|
||||
__ sllx(value, 16, O3);
|
||||
__ or3(value, O3, value);
|
||||
}
|
||||
|
||||
__ cmp(count, 2<<shift); // Short arrays (< 8 bytes) fill by element
|
||||
__ brx(Assembler::lessUnsigned, false, Assembler::pn, L_fill_elements); // use unsigned cmp
|
||||
__ delayed()->andcc(count, 1, G0);
|
||||
|
||||
if (!aligned && (t == T_BYTE || t == T_SHORT)) {
|
||||
// align source address at 4 bytes address boundary
|
||||
if (t == T_BYTE) {
|
||||
// One byte misalignment happens only for byte arrays
|
||||
__ andcc(to, 1, G0);
|
||||
__ br(Assembler::zero, false, Assembler::pt, L_skip_align1);
|
||||
__ delayed()->nop();
|
||||
__ stb(value, to, 0);
|
||||
__ inc(to, 1);
|
||||
__ dec(count, 1);
|
||||
__ BIND(L_skip_align1);
|
||||
}
|
||||
// Two bytes misalignment happens only for byte and short (char) arrays
|
||||
__ andcc(to, 2, G0);
|
||||
__ br(Assembler::zero, false, Assembler::pt, L_skip_align2);
|
||||
__ delayed()->nop();
|
||||
__ sth(value, to, 0);
|
||||
__ inc(to, 2);
|
||||
__ dec(count, 1 << (shift - 1));
|
||||
__ BIND(L_skip_align2);
|
||||
}
|
||||
#ifdef _LP64
|
||||
if (!aligned) {
|
||||
#endif
|
||||
// align to 8 bytes, we know we are 4 byte aligned to start
|
||||
__ andcc(to, 7, G0);
|
||||
__ br(Assembler::zero, false, Assembler::pt, L_fill_32_bytes);
|
||||
__ delayed()->nop();
|
||||
__ stw(value, to, 0);
|
||||
__ inc(to, 4);
|
||||
__ dec(count, 1 << shift);
|
||||
__ BIND(L_fill_32_bytes);
|
||||
#ifdef _LP64
|
||||
}
|
||||
#endif
|
||||
|
||||
if (t == T_INT) {
|
||||
// Zero extend value
|
||||
__ srl(value, 0, value);
|
||||
}
|
||||
if (t == T_BYTE || t == T_SHORT || t == T_INT) {
|
||||
__ sllx(value, 32, O3);
|
||||
__ or3(value, O3, value);
|
||||
}
|
||||
|
||||
Label L_check_fill_8_bytes;
|
||||
// Fill 32-byte chunks
|
||||
__ subcc(count, 8 << shift, count);
|
||||
__ brx(Assembler::less, false, Assembler::pt, L_check_fill_8_bytes);
|
||||
__ delayed()->nop();
|
||||
|
||||
Label L_fill_32_bytes_loop, L_fill_4_bytes;
|
||||
__ align(16);
|
||||
__ BIND(L_fill_32_bytes_loop);
|
||||
|
||||
__ stx(value, to, 0);
|
||||
__ stx(value, to, 8);
|
||||
__ stx(value, to, 16);
|
||||
__ stx(value, to, 24);
|
||||
|
||||
__ subcc(count, 8 << shift, count);
|
||||
__ brx(Assembler::greaterEqual, false, Assembler::pt, L_fill_32_bytes_loop);
|
||||
__ delayed()->add(to, 32, to);
|
||||
|
||||
__ BIND(L_check_fill_8_bytes);
|
||||
__ addcc(count, 8 << shift, count);
|
||||
__ brx(Assembler::zero, false, Assembler::pn, L_exit);
|
||||
__ delayed()->subcc(count, 1 << (shift + 1), count);
|
||||
__ brx(Assembler::less, false, Assembler::pn, L_fill_4_bytes);
|
||||
__ delayed()->andcc(count, 1<<shift, G0);
|
||||
|
||||
//
|
||||
// length is too short, just fill 8 bytes at a time
|
||||
//
|
||||
Label L_fill_8_bytes_loop;
|
||||
__ BIND(L_fill_8_bytes_loop);
|
||||
__ stx(value, to, 0);
|
||||
__ subcc(count, 1 << (shift + 1), count);
|
||||
__ brx(Assembler::greaterEqual, false, Assembler::pn, L_fill_8_bytes_loop);
|
||||
__ delayed()->add(to, 8, to);
|
||||
|
||||
// fill trailing 4 bytes
|
||||
__ andcc(count, 1<<shift, G0); // in delay slot of branches
|
||||
if (t == T_INT) {
|
||||
__ BIND(L_fill_elements);
|
||||
}
|
||||
__ BIND(L_fill_4_bytes);
|
||||
__ brx(Assembler::zero, false, Assembler::pt, L_fill_2_bytes);
|
||||
if (t == T_BYTE || t == T_SHORT) {
|
||||
__ delayed()->andcc(count, 1<<(shift-1), G0);
|
||||
} else {
|
||||
__ delayed()->nop();
|
||||
}
|
||||
__ stw(value, to, 0);
|
||||
if (t == T_BYTE || t == T_SHORT) {
|
||||
__ inc(to, 4);
|
||||
// fill trailing 2 bytes
|
||||
__ andcc(count, 1<<(shift-1), G0); // in delay slot of branches
|
||||
__ BIND(L_fill_2_bytes);
|
||||
__ brx(Assembler::zero, false, Assembler::pt, L_fill_byte);
|
||||
__ delayed()->andcc(count, 1, count);
|
||||
__ sth(value, to, 0);
|
||||
if (t == T_BYTE) {
|
||||
__ inc(to, 2);
|
||||
// fill trailing byte
|
||||
__ andcc(count, 1, count); // in delay slot of branches
|
||||
__ BIND(L_fill_byte);
|
||||
__ brx(Assembler::zero, false, Assembler::pt, L_exit);
|
||||
__ delayed()->nop();
|
||||
__ stb(value, to, 0);
|
||||
} else {
|
||||
__ BIND(L_fill_byte);
|
||||
}
|
||||
} else {
|
||||
__ BIND(L_fill_2_bytes);
|
||||
}
|
||||
__ BIND(L_exit);
|
||||
__ retl();
|
||||
__ delayed()->nop();
|
||||
|
||||
// Handle copies less than 8 bytes. Int is handled elsewhere.
|
||||
if (t == T_BYTE) {
|
||||
__ BIND(L_fill_elements);
|
||||
Label L_fill_2, L_fill_4;
|
||||
// in delay slot __ andcc(count, 1, G0);
|
||||
__ brx(Assembler::zero, false, Assembler::pt, L_fill_2);
|
||||
__ delayed()->andcc(count, 2, G0);
|
||||
__ stb(value, to, 0);
|
||||
__ inc(to, 1);
|
||||
__ BIND(L_fill_2);
|
||||
__ brx(Assembler::zero, false, Assembler::pt, L_fill_4);
|
||||
__ delayed()->andcc(count, 4, G0);
|
||||
__ stb(value, to, 0);
|
||||
__ stb(value, to, 1);
|
||||
__ inc(to, 2);
|
||||
__ BIND(L_fill_4);
|
||||
__ brx(Assembler::zero, false, Assembler::pt, L_exit);
|
||||
__ delayed()->nop();
|
||||
__ stb(value, to, 0);
|
||||
__ stb(value, to, 1);
|
||||
__ stb(value, to, 2);
|
||||
__ retl();
|
||||
__ delayed()->stb(value, to, 3);
|
||||
}
|
||||
|
||||
if (t == T_SHORT) {
|
||||
Label L_fill_2;
|
||||
__ BIND(L_fill_elements);
|
||||
// in delay slot __ andcc(count, 1, G0);
|
||||
__ brx(Assembler::zero, false, Assembler::pt, L_fill_2);
|
||||
__ delayed()->andcc(count, 2, G0);
|
||||
__ sth(value, to, 0);
|
||||
__ inc(to, 2);
|
||||
__ BIND(L_fill_2);
|
||||
__ brx(Assembler::zero, false, Assembler::pt, L_exit);
|
||||
__ delayed()->nop();
|
||||
__ sth(value, to, 0);
|
||||
__ retl();
|
||||
__ delayed()->sth(value, to, 2);
|
||||
}
|
||||
return start;
|
||||
}
|
||||
|
||||
//
|
||||
// Generate stub for conjoint short copy. If "aligned" is true, the
|
||||
// "from" and "to" addresses are assumed to be heapword aligned.
|
||||
@ -2855,6 +3078,13 @@ class StubGenerator: public StubCodeGenerator {
|
||||
StubRoutines::_checkcast_arraycopy = generate_checkcast_copy("checkcast_arraycopy");
|
||||
StubRoutines::_unsafe_arraycopy = generate_unsafe_copy("unsafe_arraycopy");
|
||||
StubRoutines::_generic_arraycopy = generate_generic_copy("generic_arraycopy");
|
||||
|
||||
StubRoutines::_jbyte_fill = generate_fill(T_BYTE, false, "jbyte_fill");
|
||||
StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill");
|
||||
StubRoutines::_jint_fill = generate_fill(T_INT, false, "jint_fill");
|
||||
StubRoutines::_arrayof_jbyte_fill = generate_fill(T_BYTE, true, "arrayof_jbyte_fill");
|
||||
StubRoutines::_arrayof_jshort_fill = generate_fill(T_SHORT, true, "arrayof_jshort_fill");
|
||||
StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill");
|
||||
}
|
||||
|
||||
void generate_initial() {
|
||||
|
@ -43,7 +43,7 @@ enum /* platform_dependent_constants */ {
|
||||
|
||||
// MethodHandles adapters
|
||||
enum method_handles_platform_dependent_constants {
|
||||
method_handles_adapters_code_size = 6000
|
||||
method_handles_adapters_code_size = 12000
|
||||
};
|
||||
|
||||
class Sparc {
|
||||
|
@ -294,35 +294,65 @@ address TemplateInterpreterGenerator::generate_continuation_for(TosState state)
|
||||
// ??: invocation counter
|
||||
//
|
||||
void InterpreterGenerator::generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue) {
|
||||
// Update standard invocation counters
|
||||
__ increment_invocation_counter(O0, G3_scratch);
|
||||
if (ProfileInterpreter) { // %%% Merge this into methodDataOop
|
||||
Address interpreter_invocation_counter(Lmethod, methodOopDesc::interpreter_invocation_counter_offset());
|
||||
__ ld(interpreter_invocation_counter, G3_scratch);
|
||||
__ inc(G3_scratch);
|
||||
__ st(G3_scratch, interpreter_invocation_counter);
|
||||
}
|
||||
// Note: In tiered we increment either counters in methodOop or in MDO depending if we're profiling or not.
|
||||
if (TieredCompilation) {
|
||||
const int increment = InvocationCounter::count_increment;
|
||||
const int mask = ((1 << Tier0InvokeNotifyFreqLog) - 1) << InvocationCounter::count_shift;
|
||||
Label no_mdo, done;
|
||||
if (ProfileInterpreter) {
|
||||
// If no method data exists, go to profile_continue.
|
||||
__ ld_ptr(Lmethod, methodOopDesc::method_data_offset(), G4_scratch);
|
||||
__ br_null(G4_scratch, false, Assembler::pn, no_mdo);
|
||||
__ delayed()->nop();
|
||||
// Increment counter
|
||||
Address mdo_invocation_counter(G4_scratch,
|
||||
in_bytes(methodDataOopDesc::invocation_counter_offset()) +
|
||||
in_bytes(InvocationCounter::counter_offset()));
|
||||
__ increment_mask_and_jump(mdo_invocation_counter, increment, mask,
|
||||
G3_scratch, Lscratch,
|
||||
Assembler::zero, overflow);
|
||||
__ ba(false, done);
|
||||
__ delayed()->nop();
|
||||
}
|
||||
|
||||
if (ProfileInterpreter && profile_method != NULL) {
|
||||
// Test to see if we should create a method data oop
|
||||
AddressLiteral profile_limit(&InvocationCounter::InterpreterProfileLimit);
|
||||
__ sethi(profile_limit, G3_scratch);
|
||||
__ ld(G3_scratch, profile_limit.low10(), G3_scratch);
|
||||
// Increment counter in methodOop
|
||||
__ bind(no_mdo);
|
||||
Address invocation_counter(Lmethod,
|
||||
in_bytes(methodOopDesc::invocation_counter_offset()) +
|
||||
in_bytes(InvocationCounter::counter_offset()));
|
||||
__ increment_mask_and_jump(invocation_counter, increment, mask,
|
||||
G3_scratch, Lscratch,
|
||||
Assembler::zero, overflow);
|
||||
__ bind(done);
|
||||
} else {
|
||||
// Update standard invocation counters
|
||||
__ increment_invocation_counter(O0, G3_scratch);
|
||||
if (ProfileInterpreter) { // %%% Merge this into methodDataOop
|
||||
Address interpreter_invocation_counter(Lmethod,in_bytes(methodOopDesc::interpreter_invocation_counter_offset()));
|
||||
__ ld(interpreter_invocation_counter, G3_scratch);
|
||||
__ inc(G3_scratch);
|
||||
__ st(G3_scratch, interpreter_invocation_counter);
|
||||
}
|
||||
|
||||
if (ProfileInterpreter && profile_method != NULL) {
|
||||
// Test to see if we should create a method data oop
|
||||
AddressLiteral profile_limit((address)&InvocationCounter::InterpreterProfileLimit);
|
||||
__ load_contents(profile_limit, G3_scratch);
|
||||
__ cmp(O0, G3_scratch);
|
||||
__ br(Assembler::lessUnsigned, false, Assembler::pn, *profile_method_continue);
|
||||
__ delayed()->nop();
|
||||
|
||||
// if no method data exists, go to profile_method
|
||||
__ test_method_data_pointer(*profile_method);
|
||||
}
|
||||
|
||||
AddressLiteral invocation_limit((address)&InvocationCounter::InterpreterInvocationLimit);
|
||||
__ load_contents(invocation_limit, G3_scratch);
|
||||
__ cmp(O0, G3_scratch);
|
||||
__ br(Assembler::lessUnsigned, false, Assembler::pn, *profile_method_continue);
|
||||
__ br(Assembler::greaterEqualUnsigned, false, Assembler::pn, *overflow);
|
||||
__ delayed()->nop();
|
||||
|
||||
// if no method data exists, go to profile_method
|
||||
__ test_method_data_pointer(*profile_method);
|
||||
}
|
||||
|
||||
AddressLiteral invocation_limit(&InvocationCounter::InterpreterInvocationLimit);
|
||||
__ sethi(invocation_limit, G3_scratch);
|
||||
__ ld(G3_scratch, invocation_limit.low10(), G3_scratch);
|
||||
__ cmp(O0, G3_scratch);
|
||||
__ br(Assembler::greaterEqualUnsigned, false, Assembler::pn, *overflow);
|
||||
__ delayed()->nop();
|
||||
|
||||
}
|
||||
|
||||
// Allocate monitor and lock method (asm interpreter)
|
||||
|
@ -1580,6 +1580,7 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
|
||||
const Register O0_cur_bcp = O0;
|
||||
__ mov( Lbcp, O0_cur_bcp );
|
||||
|
||||
|
||||
bool increment_invocation_counter_for_backward_branches = UseCompiler && UseLoopCounter;
|
||||
if ( increment_invocation_counter_for_backward_branches ) {
|
||||
Label Lforward;
|
||||
@ -1588,17 +1589,84 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
|
||||
// Bump bytecode pointer by displacement (take the branch)
|
||||
__ delayed()->add( O1_disp, Lbcp, Lbcp ); // add to bc addr
|
||||
|
||||
// Update Backedge branch separately from invocations
|
||||
const Register G4_invoke_ctr = G4;
|
||||
__ increment_backedge_counter(G4_invoke_ctr, G1_scratch);
|
||||
if (ProfileInterpreter) {
|
||||
__ test_invocation_counter_for_mdp(G4_invoke_ctr, Lbcp, G3_scratch, Lforward);
|
||||
if (UseOnStackReplacement) {
|
||||
__ test_backedge_count_for_osr(O2_bumped_count, O0_cur_bcp, G3_scratch);
|
||||
if (TieredCompilation) {
|
||||
Label Lno_mdo, Loverflow;
|
||||
int increment = InvocationCounter::count_increment;
|
||||
int mask = ((1 << Tier0BackedgeNotifyFreqLog) - 1) << InvocationCounter::count_shift;
|
||||
if (ProfileInterpreter) {
|
||||
// If no method data exists, go to profile_continue.
|
||||
__ ld_ptr(Lmethod, methodOopDesc::method_data_offset(), G4_scratch);
|
||||
__ br_null(G4_scratch, false, Assembler::pn, Lno_mdo);
|
||||
__ delayed()->nop();
|
||||
|
||||
// Increment backedge counter in the MDO
|
||||
Address mdo_backedge_counter(G4_scratch, in_bytes(methodDataOopDesc::backedge_counter_offset()) +
|
||||
in_bytes(InvocationCounter::counter_offset()));
|
||||
__ increment_mask_and_jump(mdo_backedge_counter, increment, mask, G3_scratch, Lscratch,
|
||||
Assembler::notZero, &Lforward);
|
||||
__ ba(false, Loverflow);
|
||||
__ delayed()->nop();
|
||||
}
|
||||
|
||||
// If there's no MDO, increment counter in methodOop
|
||||
__ bind(Lno_mdo);
|
||||
Address backedge_counter(Lmethod, in_bytes(methodOopDesc::backedge_counter_offset()) +
|
||||
in_bytes(InvocationCounter::counter_offset()));
|
||||
__ increment_mask_and_jump(backedge_counter, increment, mask, G3_scratch, Lscratch,
|
||||
Assembler::notZero, &Lforward);
|
||||
__ bind(Loverflow);
|
||||
|
||||
// notify point for loop, pass branch bytecode
|
||||
__ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), O0_cur_bcp);
|
||||
|
||||
// Was an OSR adapter generated?
|
||||
// O0 = osr nmethod
|
||||
__ br_null(O0, false, Assembler::pn, Lforward);
|
||||
__ delayed()->nop();
|
||||
|
||||
// Has the nmethod been invalidated already?
|
||||
__ ld(O0, nmethod::entry_bci_offset(), O2);
|
||||
__ cmp(O2, InvalidOSREntryBci);
|
||||
__ br(Assembler::equal, false, Assembler::pn, Lforward);
|
||||
__ delayed()->nop();
|
||||
|
||||
// migrate the interpreter frame off of the stack
|
||||
|
||||
__ mov(G2_thread, L7);
|
||||
// save nmethod
|
||||
__ mov(O0, L6);
|
||||
__ set_last_Java_frame(SP, noreg);
|
||||
__ call_VM_leaf(noreg, CAST_FROM_FN_PTR(address, SharedRuntime::OSR_migration_begin), L7);
|
||||
__ reset_last_Java_frame();
|
||||
__ mov(L7, G2_thread);
|
||||
|
||||
// move OSR nmethod to I1
|
||||
__ mov(L6, I1);
|
||||
|
||||
// OSR buffer to I0
|
||||
__ mov(O0, I0);
|
||||
|
||||
// remove the interpreter frame
|
||||
__ restore(I5_savedSP, 0, SP);
|
||||
|
||||
// Jump to the osr code.
|
||||
__ ld_ptr(O1, nmethod::osr_entry_point_offset(), O2);
|
||||
__ jmp(O2, G0);
|
||||
__ delayed()->nop();
|
||||
|
||||
} else {
|
||||
if (UseOnStackReplacement) {
|
||||
__ test_backedge_count_for_osr(G4_invoke_ctr, O0_cur_bcp, G3_scratch);
|
||||
// Update Backedge branch separately from invocations
|
||||
const Register G4_invoke_ctr = G4;
|
||||
__ increment_backedge_counter(G4_invoke_ctr, G1_scratch);
|
||||
if (ProfileInterpreter) {
|
||||
__ test_invocation_counter_for_mdp(G4_invoke_ctr, Lbcp, G3_scratch, Lforward);
|
||||
if (UseOnStackReplacement) {
|
||||
__ test_backedge_count_for_osr(O2_bumped_count, O0_cur_bcp, G3_scratch);
|
||||
}
|
||||
} else {
|
||||
if (UseOnStackReplacement) {
|
||||
__ test_backedge_count_for_osr(G4_invoke_ctr, O0_cur_bcp, G3_scratch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,6 +112,11 @@ void VM_Version::initialize() {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef COMPILER2
|
||||
// Currently not supported anywhere.
|
||||
FLAG_SET_DEFAULT(UseFPUForSpilling, false);
|
||||
#endif
|
||||
|
||||
char buf[512];
|
||||
jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s",
|
||||
(has_v8() ? ", has_v8" : ""),
|
||||
|
@ -4993,19 +4993,22 @@ void MacroAssembler::debug32(int rdi, int rsi, int rbp, int rsp, int rbx, int rd
|
||||
ttyLocker ttyl;
|
||||
tty->print_cr("eip = 0x%08x", eip);
|
||||
#ifndef PRODUCT
|
||||
tty->cr();
|
||||
findpc(eip);
|
||||
tty->cr();
|
||||
if ((WizardMode || Verbose) && PrintMiscellaneous) {
|
||||
tty->cr();
|
||||
findpc(eip);
|
||||
tty->cr();
|
||||
}
|
||||
#endif
|
||||
tty->print_cr("rax, = 0x%08x", rax);
|
||||
tty->print_cr("rbx, = 0x%08x", rbx);
|
||||
tty->print_cr("rax = 0x%08x", rax);
|
||||
tty->print_cr("rbx = 0x%08x", rbx);
|
||||
tty->print_cr("rcx = 0x%08x", rcx);
|
||||
tty->print_cr("rdx = 0x%08x", rdx);
|
||||
tty->print_cr("rdi = 0x%08x", rdi);
|
||||
tty->print_cr("rsi = 0x%08x", rsi);
|
||||
tty->print_cr("rbp, = 0x%08x", rbp);
|
||||
tty->print_cr("rbp = 0x%08x", rbp);
|
||||
tty->print_cr("rsp = 0x%08x", rsp);
|
||||
BREAKPOINT;
|
||||
assert(false, "start up GDB");
|
||||
}
|
||||
} else {
|
||||
ttyLocker ttyl;
|
||||
@ -7677,11 +7680,19 @@ RegisterOrConstant MacroAssembler::delayed_value_impl(intptr_t* delayed_value_ad
|
||||
movptr(tmp, ExternalAddress((address) delayed_value_addr));
|
||||
|
||||
#ifdef ASSERT
|
||||
Label L;
|
||||
testptr(tmp, tmp);
|
||||
jccb(Assembler::notZero, L);
|
||||
hlt();
|
||||
bind(L);
|
||||
{ Label L;
|
||||
testptr(tmp, tmp);
|
||||
if (WizardMode) {
|
||||
jcc(Assembler::notZero, L);
|
||||
char* buf = new char[40];
|
||||
sprintf(buf, "DelayedValue="INTPTR_FORMAT, delayed_value_addr[1]);
|
||||
stop(buf);
|
||||
} else {
|
||||
jccb(Assembler::notZero, L);
|
||||
hlt();
|
||||
}
|
||||
bind(L);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (offset != 0)
|
||||
@ -8767,6 +8778,186 @@ void MacroAssembler::char_arrays_equals(bool is_array_equ, Register ary1, Regist
|
||||
bind(DONE);
|
||||
}
|
||||
|
||||
#ifdef PRODUCT
|
||||
#define BLOCK_COMMENT(str) /* nothing */
|
||||
#else
|
||||
#define BLOCK_COMMENT(str) block_comment(str)
|
||||
#endif
|
||||
|
||||
#define BIND(label) bind(label); BLOCK_COMMENT(#label ":")
|
||||
void MacroAssembler::generate_fill(BasicType t, bool aligned,
|
||||
Register to, Register value, Register count,
|
||||
Register rtmp, XMMRegister xtmp) {
|
||||
assert_different_registers(to, value, count, rtmp);
|
||||
Label L_exit, L_skip_align1, L_skip_align2, L_fill_byte;
|
||||
Label L_fill_2_bytes, L_fill_4_bytes;
|
||||
|
||||
int shift = -1;
|
||||
switch (t) {
|
||||
case T_BYTE:
|
||||
shift = 2;
|
||||
break;
|
||||
case T_SHORT:
|
||||
shift = 1;
|
||||
break;
|
||||
case T_INT:
|
||||
shift = 0;
|
||||
break;
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
|
||||
if (t == T_BYTE) {
|
||||
andl(value, 0xff);
|
||||
movl(rtmp, value);
|
||||
shll(rtmp, 8);
|
||||
orl(value, rtmp);
|
||||
}
|
||||
if (t == T_SHORT) {
|
||||
andl(value, 0xffff);
|
||||
}
|
||||
if (t == T_BYTE || t == T_SHORT) {
|
||||
movl(rtmp, value);
|
||||
shll(rtmp, 16);
|
||||
orl(value, rtmp);
|
||||
}
|
||||
|
||||
cmpl(count, 2<<shift); // Short arrays (< 8 bytes) fill by element
|
||||
jcc(Assembler::below, L_fill_4_bytes); // use unsigned cmp
|
||||
if (!UseUnalignedLoadStores && !aligned && (t == T_BYTE || t == T_SHORT)) {
|
||||
// align source address at 4 bytes address boundary
|
||||
if (t == T_BYTE) {
|
||||
// One byte misalignment happens only for byte arrays
|
||||
testptr(to, 1);
|
||||
jccb(Assembler::zero, L_skip_align1);
|
||||
movb(Address(to, 0), value);
|
||||
increment(to);
|
||||
decrement(count);
|
||||
BIND(L_skip_align1);
|
||||
}
|
||||
// Two bytes misalignment happens only for byte and short (char) arrays
|
||||
testptr(to, 2);
|
||||
jccb(Assembler::zero, L_skip_align2);
|
||||
movw(Address(to, 0), value);
|
||||
addptr(to, 2);
|
||||
subl(count, 1<<(shift-1));
|
||||
BIND(L_skip_align2);
|
||||
}
|
||||
if (UseSSE < 2) {
|
||||
Label L_fill_32_bytes_loop, L_check_fill_8_bytes, L_fill_8_bytes_loop, L_fill_8_bytes;
|
||||
// Fill 32-byte chunks
|
||||
subl(count, 8 << shift);
|
||||
jcc(Assembler::less, L_check_fill_8_bytes);
|
||||
align(16);
|
||||
|
||||
BIND(L_fill_32_bytes_loop);
|
||||
|
||||
for (int i = 0; i < 32; i += 4) {
|
||||
movl(Address(to, i), value);
|
||||
}
|
||||
|
||||
addptr(to, 32);
|
||||
subl(count, 8 << shift);
|
||||
jcc(Assembler::greaterEqual, L_fill_32_bytes_loop);
|
||||
BIND(L_check_fill_8_bytes);
|
||||
addl(count, 8 << shift);
|
||||
jccb(Assembler::zero, L_exit);
|
||||
jmpb(L_fill_8_bytes);
|
||||
|
||||
//
|
||||
// length is too short, just fill qwords
|
||||
//
|
||||
BIND(L_fill_8_bytes_loop);
|
||||
movl(Address(to, 0), value);
|
||||
movl(Address(to, 4), value);
|
||||
addptr(to, 8);
|
||||
BIND(L_fill_8_bytes);
|
||||
subl(count, 1 << (shift + 1));
|
||||
jcc(Assembler::greaterEqual, L_fill_8_bytes_loop);
|
||||
// fall through to fill 4 bytes
|
||||
} else {
|
||||
Label L_fill_32_bytes;
|
||||
if (!UseUnalignedLoadStores) {
|
||||
// align to 8 bytes, we know we are 4 byte aligned to start
|
||||
testptr(to, 4);
|
||||
jccb(Assembler::zero, L_fill_32_bytes);
|
||||
movl(Address(to, 0), value);
|
||||
addptr(to, 4);
|
||||
subl(count, 1<<shift);
|
||||
}
|
||||
BIND(L_fill_32_bytes);
|
||||
{
|
||||
assert( UseSSE >= 2, "supported cpu only" );
|
||||
Label L_fill_32_bytes_loop, L_check_fill_8_bytes, L_fill_8_bytes_loop, L_fill_8_bytes;
|
||||
// Fill 32-byte chunks
|
||||
movdl(xtmp, value);
|
||||
pshufd(xtmp, xtmp, 0);
|
||||
|
||||
subl(count, 8 << shift);
|
||||
jcc(Assembler::less, L_check_fill_8_bytes);
|
||||
align(16);
|
||||
|
||||
BIND(L_fill_32_bytes_loop);
|
||||
|
||||
if (UseUnalignedLoadStores) {
|
||||
movdqu(Address(to, 0), xtmp);
|
||||
movdqu(Address(to, 16), xtmp);
|
||||
} else {
|
||||
movq(Address(to, 0), xtmp);
|
||||
movq(Address(to, 8), xtmp);
|
||||
movq(Address(to, 16), xtmp);
|
||||
movq(Address(to, 24), xtmp);
|
||||
}
|
||||
|
||||
addptr(to, 32);
|
||||
subl(count, 8 << shift);
|
||||
jcc(Assembler::greaterEqual, L_fill_32_bytes_loop);
|
||||
BIND(L_check_fill_8_bytes);
|
||||
addl(count, 8 << shift);
|
||||
jccb(Assembler::zero, L_exit);
|
||||
jmpb(L_fill_8_bytes);
|
||||
|
||||
//
|
||||
// length is too short, just fill qwords
|
||||
//
|
||||
BIND(L_fill_8_bytes_loop);
|
||||
movq(Address(to, 0), xtmp);
|
||||
addptr(to, 8);
|
||||
BIND(L_fill_8_bytes);
|
||||
subl(count, 1 << (shift + 1));
|
||||
jcc(Assembler::greaterEqual, L_fill_8_bytes_loop);
|
||||
}
|
||||
}
|
||||
// fill trailing 4 bytes
|
||||
BIND(L_fill_4_bytes);
|
||||
testl(count, 1<<shift);
|
||||
jccb(Assembler::zero, L_fill_2_bytes);
|
||||
movl(Address(to, 0), value);
|
||||
if (t == T_BYTE || t == T_SHORT) {
|
||||
addptr(to, 4);
|
||||
BIND(L_fill_2_bytes);
|
||||
// fill trailing 2 bytes
|
||||
testl(count, 1<<(shift-1));
|
||||
jccb(Assembler::zero, L_fill_byte);
|
||||
movw(Address(to, 0), value);
|
||||
if (t == T_BYTE) {
|
||||
addptr(to, 2);
|
||||
BIND(L_fill_byte);
|
||||
// fill trailing byte
|
||||
testl(count, 1);
|
||||
jccb(Assembler::zero, L_exit);
|
||||
movb(Address(to, 0), value);
|
||||
} else {
|
||||
BIND(L_fill_byte);
|
||||
}
|
||||
} else {
|
||||
BIND(L_fill_2_bytes);
|
||||
}
|
||||
BIND(L_exit);
|
||||
}
|
||||
#undef BIND
|
||||
#undef BLOCK_COMMENT
|
||||
|
||||
|
||||
Assembler::Condition MacroAssembler::negate_condition(Assembler::Condition cond) {
|
||||
switch (cond) {
|
||||
// Note some conditions are synonyms for others
|
||||
|
@ -2242,6 +2242,11 @@ public:
|
||||
Register limit, Register result, Register chr,
|
||||
XMMRegister vec1, XMMRegister vec2);
|
||||
|
||||
// Fill primitive arrays
|
||||
void generate_fill(BasicType t, bool aligned,
|
||||
Register to, Register value, Register count,
|
||||
Register rtmp, XMMRegister xtmp);
|
||||
|
||||
#undef VIRTUAL
|
||||
|
||||
};
|
||||
|
@ -68,19 +68,15 @@ void ConversionStub::emit_code(LIR_Assembler* ce) {
|
||||
__ jmp(_continuation);
|
||||
}
|
||||
|
||||
#ifdef TIERED
|
||||
void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
|
||||
__ bind(_entry);
|
||||
ce->store_parameter(_method->as_register(), 1);
|
||||
ce->store_parameter(_bci, 0);
|
||||
__ call(RuntimeAddress(Runtime1::entry_for(Runtime1::counter_overflow_id)));
|
||||
ce->add_call_info_here(_info);
|
||||
ce->verify_oop_map(_info);
|
||||
|
||||
__ jmp(_continuation);
|
||||
}
|
||||
#endif // TIERED
|
||||
|
||||
|
||||
|
||||
RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index,
|
||||
bool throw_index_out_of_bounds_exception)
|
||||
|
@ -1613,6 +1613,188 @@ void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
|
||||
__ bind(*op->stub()->continuation());
|
||||
}
|
||||
|
||||
void LIR_Assembler::type_profile_helper(Register mdo,
|
||||
ciMethodData *md, ciProfileData *data,
|
||||
Register recv, Label* update_done) {
|
||||
for (uint i = 0; i < ReceiverTypeData::row_limit(); i++) {
|
||||
Label next_test;
|
||||
// See if the receiver is receiver[n].
|
||||
__ cmpptr(recv, Address(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i))));
|
||||
__ jccb(Assembler::notEqual, next_test);
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)));
|
||||
__ addptr(data_addr, DataLayout::counter_increment);
|
||||
__ jmp(*update_done);
|
||||
__ bind(next_test);
|
||||
}
|
||||
|
||||
// Didn't find receiver; find next empty slot and fill it in
|
||||
for (uint i = 0; i < ReceiverTypeData::row_limit(); i++) {
|
||||
Label next_test;
|
||||
Address recv_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i)));
|
||||
__ cmpptr(recv_addr, (intptr_t)NULL_WORD);
|
||||
__ jccb(Assembler::notEqual, next_test);
|
||||
__ movptr(recv_addr, recv);
|
||||
__ movptr(Address(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i))), DataLayout::counter_increment);
|
||||
__ jmp(*update_done);
|
||||
__ bind(next_test);
|
||||
}
|
||||
}
|
||||
|
||||
void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, Label* failure, Label* obj_is_null) {
|
||||
// we always need a stub for the failure case.
|
||||
CodeStub* stub = op->stub();
|
||||
Register obj = op->object()->as_register();
|
||||
Register k_RInfo = op->tmp1()->as_register();
|
||||
Register klass_RInfo = op->tmp2()->as_register();
|
||||
Register dst = op->result_opr()->as_register();
|
||||
ciKlass* k = op->klass();
|
||||
Register Rtmp1 = noreg;
|
||||
|
||||
// check if it needs to be profiled
|
||||
ciMethodData* md;
|
||||
ciProfileData* data;
|
||||
|
||||
if (op->should_profile()) {
|
||||
ciMethod* method = op->profiled_method();
|
||||
assert(method != NULL, "Should have method");
|
||||
int bci = op->profiled_bci();
|
||||
md = method->method_data();
|
||||
if (md == NULL) {
|
||||
bailout("out of memory building methodDataOop");
|
||||
return;
|
||||
}
|
||||
data = md->bci_to_data(bci);
|
||||
assert(data != NULL, "need data for type check");
|
||||
assert(data->is_ReceiverTypeData(), "need ReceiverTypeData for type check");
|
||||
}
|
||||
Label profile_cast_success, profile_cast_failure;
|
||||
Label *success_target = op->should_profile() ? &profile_cast_success : success;
|
||||
Label *failure_target = op->should_profile() ? &profile_cast_failure : failure;
|
||||
|
||||
if (obj == k_RInfo) {
|
||||
k_RInfo = dst;
|
||||
} else if (obj == klass_RInfo) {
|
||||
klass_RInfo = dst;
|
||||
}
|
||||
if (k->is_loaded()) {
|
||||
select_different_registers(obj, dst, k_RInfo, klass_RInfo);
|
||||
} else {
|
||||
Rtmp1 = op->tmp3()->as_register();
|
||||
select_different_registers(obj, dst, k_RInfo, klass_RInfo, Rtmp1);
|
||||
}
|
||||
|
||||
assert_different_registers(obj, k_RInfo, klass_RInfo);
|
||||
if (!k->is_loaded()) {
|
||||
jobject2reg_with_patching(k_RInfo, op->info_for_patch());
|
||||
} else {
|
||||
#ifdef _LP64
|
||||
__ movoop(k_RInfo, k->constant_encoding());
|
||||
#endif // _LP64
|
||||
}
|
||||
assert(obj != k_RInfo, "must be different");
|
||||
|
||||
__ cmpptr(obj, (int32_t)NULL_WORD);
|
||||
if (op->should_profile()) {
|
||||
Label not_null;
|
||||
__ jccb(Assembler::notEqual, not_null);
|
||||
// Object is null; update MDO and exit
|
||||
Register mdo = klass_RInfo;
|
||||
__ movoop(mdo, md->constant_encoding());
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, DataLayout::header_offset()));
|
||||
int header_bits = DataLayout::flag_mask_to_header_mask(BitData::null_seen_byte_constant());
|
||||
__ orl(data_addr, header_bits);
|
||||
__ jmp(*obj_is_null);
|
||||
__ bind(not_null);
|
||||
} else {
|
||||
__ jcc(Assembler::equal, *obj_is_null);
|
||||
}
|
||||
__ verify_oop(obj);
|
||||
|
||||
if (op->fast_check()) {
|
||||
// get object class
|
||||
// not a safepoint as obj null check happens earlier
|
||||
if (k->is_loaded()) {
|
||||
#ifdef _LP64
|
||||
__ cmpptr(k_RInfo, Address(obj, oopDesc::klass_offset_in_bytes()));
|
||||
#else
|
||||
__ cmpoop(Address(obj, oopDesc::klass_offset_in_bytes()), k->constant_encoding());
|
||||
#endif // _LP64
|
||||
} else {
|
||||
__ cmpptr(k_RInfo, Address(obj, oopDesc::klass_offset_in_bytes()));
|
||||
}
|
||||
__ jcc(Assembler::notEqual, *failure_target);
|
||||
// successful cast, fall through to profile or jump
|
||||
} else {
|
||||
// get object class
|
||||
// not a safepoint as obj null check happens earlier
|
||||
__ movptr(klass_RInfo, Address(obj, oopDesc::klass_offset_in_bytes()));
|
||||
if (k->is_loaded()) {
|
||||
// See if we get an immediate positive hit
|
||||
#ifdef _LP64
|
||||
__ cmpptr(k_RInfo, Address(klass_RInfo, k->super_check_offset()));
|
||||
#else
|
||||
__ cmpoop(Address(klass_RInfo, k->super_check_offset()), k->constant_encoding());
|
||||
#endif // _LP64
|
||||
if (sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() != k->super_check_offset()) {
|
||||
__ jcc(Assembler::notEqual, *failure_target);
|
||||
// successful cast, fall through to profile or jump
|
||||
} else {
|
||||
// See if we get an immediate positive hit
|
||||
__ jcc(Assembler::equal, *success_target);
|
||||
// check for self
|
||||
#ifdef _LP64
|
||||
__ cmpptr(klass_RInfo, k_RInfo);
|
||||
#else
|
||||
__ cmpoop(klass_RInfo, k->constant_encoding());
|
||||
#endif // _LP64
|
||||
__ jcc(Assembler::equal, *success_target);
|
||||
|
||||
__ push(klass_RInfo);
|
||||
#ifdef _LP64
|
||||
__ push(k_RInfo);
|
||||
#else
|
||||
__ pushoop(k->constant_encoding());
|
||||
#endif // _LP64
|
||||
__ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
|
||||
__ pop(klass_RInfo);
|
||||
__ pop(klass_RInfo);
|
||||
// result is a boolean
|
||||
__ cmpl(klass_RInfo, 0);
|
||||
__ jcc(Assembler::equal, *failure_target);
|
||||
// successful cast, fall through to profile or jump
|
||||
}
|
||||
} else {
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, success_target, failure_target, NULL);
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
__ push(klass_RInfo);
|
||||
__ push(k_RInfo);
|
||||
__ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
|
||||
__ pop(klass_RInfo);
|
||||
__ pop(k_RInfo);
|
||||
// result is a boolean
|
||||
__ cmpl(k_RInfo, 0);
|
||||
__ jcc(Assembler::equal, *failure_target);
|
||||
// successful cast, fall through to profile or jump
|
||||
}
|
||||
}
|
||||
if (op->should_profile()) {
|
||||
Register mdo = klass_RInfo, recv = k_RInfo;
|
||||
__ bind(profile_cast_success);
|
||||
__ movoop(mdo, md->constant_encoding());
|
||||
__ movptr(recv, Address(obj, oopDesc::klass_offset_in_bytes()));
|
||||
Label update_done;
|
||||
type_profile_helper(mdo, md, data, recv, success);
|
||||
__ jmp(*success);
|
||||
|
||||
__ bind(profile_cast_failure);
|
||||
__ movoop(mdo, md->constant_encoding());
|
||||
Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()));
|
||||
__ subptr(counter_addr, DataLayout::counter_increment);
|
||||
__ jmp(*failure);
|
||||
}
|
||||
__ jmp(*success);
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
@ -1625,9 +1807,44 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
Register Rtmp1 = op->tmp3()->as_register();
|
||||
|
||||
CodeStub* stub = op->stub();
|
||||
Label done;
|
||||
|
||||
// check if it needs to be profiled
|
||||
ciMethodData* md;
|
||||
ciProfileData* data;
|
||||
|
||||
if (op->should_profile()) {
|
||||
ciMethod* method = op->profiled_method();
|
||||
assert(method != NULL, "Should have method");
|
||||
int bci = op->profiled_bci();
|
||||
md = method->method_data();
|
||||
if (md == NULL) {
|
||||
bailout("out of memory building methodDataOop");
|
||||
return;
|
||||
}
|
||||
data = md->bci_to_data(bci);
|
||||
assert(data != NULL, "need data for type check");
|
||||
assert(data->is_ReceiverTypeData(), "need ReceiverTypeData for type check");
|
||||
}
|
||||
Label profile_cast_success, profile_cast_failure, done;
|
||||
Label *success_target = op->should_profile() ? &profile_cast_success : &done;
|
||||
Label *failure_target = op->should_profile() ? &profile_cast_failure : stub->entry();
|
||||
|
||||
__ cmpptr(value, (int32_t)NULL_WORD);
|
||||
__ jcc(Assembler::equal, done);
|
||||
if (op->should_profile()) {
|
||||
Label not_null;
|
||||
__ jccb(Assembler::notEqual, not_null);
|
||||
// Object is null; update MDO and exit
|
||||
Register mdo = klass_RInfo;
|
||||
__ movoop(mdo, md->constant_encoding());
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, DataLayout::header_offset()));
|
||||
int header_bits = DataLayout::flag_mask_to_header_mask(BitData::null_seen_byte_constant());
|
||||
__ orl(data_addr, header_bits);
|
||||
__ jmp(done);
|
||||
__ bind(not_null);
|
||||
} else {
|
||||
__ jcc(Assembler::equal, done);
|
||||
}
|
||||
|
||||
add_debug_info_for_null_check_here(op->info_for_exception());
|
||||
__ movptr(k_RInfo, Address(array, oopDesc::klass_offset_in_bytes()));
|
||||
__ movptr(klass_RInfo, Address(value, oopDesc::klass_offset_in_bytes()));
|
||||
@ -1635,7 +1852,7 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
// get instance klass
|
||||
__ movptr(k_RInfo, Address(k_RInfo, objArrayKlass::element_klass_offset_in_bytes() + sizeof(oopDesc)));
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, &done, stub->entry(), NULL);
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, success_target, failure_target, NULL);
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
__ push(klass_RInfo);
|
||||
__ push(k_RInfo);
|
||||
@ -1644,228 +1861,51 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
__ pop(k_RInfo);
|
||||
// result is a boolean
|
||||
__ cmpl(k_RInfo, 0);
|
||||
__ jcc(Assembler::equal, *stub->entry());
|
||||
__ bind(done);
|
||||
} else if (op->code() == lir_checkcast) {
|
||||
// we always need a stub for the failure case.
|
||||
CodeStub* stub = op->stub();
|
||||
Register obj = op->object()->as_register();
|
||||
Register k_RInfo = op->tmp1()->as_register();
|
||||
Register klass_RInfo = op->tmp2()->as_register();
|
||||
Register dst = op->result_opr()->as_register();
|
||||
ciKlass* k = op->klass();
|
||||
Register Rtmp1 = noreg;
|
||||
__ jcc(Assembler::equal, *failure_target);
|
||||
// fall through to the success case
|
||||
|
||||
Label done;
|
||||
if (obj == k_RInfo) {
|
||||
k_RInfo = dst;
|
||||
} else if (obj == klass_RInfo) {
|
||||
klass_RInfo = dst;
|
||||
}
|
||||
if (k->is_loaded()) {
|
||||
select_different_registers(obj, dst, k_RInfo, klass_RInfo);
|
||||
} else {
|
||||
Rtmp1 = op->tmp3()->as_register();
|
||||
select_different_registers(obj, dst, k_RInfo, klass_RInfo, Rtmp1);
|
||||
}
|
||||
|
||||
assert_different_registers(obj, k_RInfo, klass_RInfo);
|
||||
if (!k->is_loaded()) {
|
||||
jobject2reg_with_patching(k_RInfo, op->info_for_patch());
|
||||
} else {
|
||||
#ifdef _LP64
|
||||
__ movoop(k_RInfo, k->constant_encoding());
|
||||
#else
|
||||
k_RInfo = noreg;
|
||||
#endif // _LP64
|
||||
}
|
||||
assert(obj != k_RInfo, "must be different");
|
||||
__ cmpptr(obj, (int32_t)NULL_WORD);
|
||||
if (op->profiled_method() != NULL) {
|
||||
ciMethod* method = op->profiled_method();
|
||||
int bci = op->profiled_bci();
|
||||
|
||||
Label profile_done;
|
||||
__ jcc(Assembler::notEqual, profile_done);
|
||||
// Object is null; update methodDataOop
|
||||
ciMethodData* md = method->method_data();
|
||||
if (md == NULL) {
|
||||
bailout("out of memory building methodDataOop");
|
||||
return;
|
||||
}
|
||||
ciProfileData* data = md->bci_to_data(bci);
|
||||
assert(data != NULL, "need data for checkcast");
|
||||
assert(data->is_BitData(), "need BitData for checkcast");
|
||||
Register mdo = klass_RInfo;
|
||||
if (op->should_profile()) {
|
||||
Register mdo = klass_RInfo, recv = k_RInfo;
|
||||
__ bind(profile_cast_success);
|
||||
__ movoop(mdo, md->constant_encoding());
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, DataLayout::header_offset()));
|
||||
int header_bits = DataLayout::flag_mask_to_header_mask(BitData::null_seen_byte_constant());
|
||||
__ orl(data_addr, header_bits);
|
||||
__ jmp(done);
|
||||
__ bind(profile_done);
|
||||
} else {
|
||||
__ jcc(Assembler::equal, done);
|
||||
__ movptr(recv, Address(value, oopDesc::klass_offset_in_bytes()));
|
||||
Label update_done;
|
||||
type_profile_helper(mdo, md, data, recv, &done);
|
||||
__ jmpb(done);
|
||||
|
||||
__ bind(profile_cast_failure);
|
||||
__ movoop(mdo, md->constant_encoding());
|
||||
Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()));
|
||||
__ subptr(counter_addr, DataLayout::counter_increment);
|
||||
__ jmp(*stub->entry());
|
||||
}
|
||||
__ verify_oop(obj);
|
||||
|
||||
if (op->fast_check()) {
|
||||
// get object classo
|
||||
// not a safepoint as obj null check happens earlier
|
||||
if (k->is_loaded()) {
|
||||
#ifdef _LP64
|
||||
__ cmpptr(k_RInfo, Address(obj, oopDesc::klass_offset_in_bytes()));
|
||||
#else
|
||||
__ cmpoop(Address(obj, oopDesc::klass_offset_in_bytes()), k->constant_encoding());
|
||||
#endif // _LP64
|
||||
} else {
|
||||
__ cmpptr(k_RInfo, Address(obj, oopDesc::klass_offset_in_bytes()));
|
||||
|
||||
}
|
||||
__ jcc(Assembler::notEqual, *stub->entry());
|
||||
__ bind(done);
|
||||
} else {
|
||||
// get object class
|
||||
// not a safepoint as obj null check happens earlier
|
||||
__ movptr(klass_RInfo, Address(obj, oopDesc::klass_offset_in_bytes()));
|
||||
if (k->is_loaded()) {
|
||||
// See if we get an immediate positive hit
|
||||
#ifdef _LP64
|
||||
__ cmpptr(k_RInfo, Address(klass_RInfo, k->super_check_offset()));
|
||||
#else
|
||||
__ cmpoop(Address(klass_RInfo, k->super_check_offset()), k->constant_encoding());
|
||||
#endif // _LP64
|
||||
if (sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() != k->super_check_offset()) {
|
||||
__ jcc(Assembler::notEqual, *stub->entry());
|
||||
} else {
|
||||
// See if we get an immediate positive hit
|
||||
__ jcc(Assembler::equal, done);
|
||||
// check for self
|
||||
#ifdef _LP64
|
||||
__ cmpptr(klass_RInfo, k_RInfo);
|
||||
#else
|
||||
__ cmpoop(klass_RInfo, k->constant_encoding());
|
||||
#endif // _LP64
|
||||
__ jcc(Assembler::equal, done);
|
||||
|
||||
__ push(klass_RInfo);
|
||||
#ifdef _LP64
|
||||
__ push(k_RInfo);
|
||||
#else
|
||||
__ pushoop(k->constant_encoding());
|
||||
#endif // _LP64
|
||||
__ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
|
||||
__ pop(klass_RInfo);
|
||||
__ pop(klass_RInfo);
|
||||
// result is a boolean
|
||||
__ cmpl(klass_RInfo, 0);
|
||||
__ jcc(Assembler::equal, *stub->entry());
|
||||
}
|
||||
__ bind(done);
|
||||
} else {
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, &done, stub->entry(), NULL);
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
__ push(klass_RInfo);
|
||||
__ push(k_RInfo);
|
||||
__ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
|
||||
__ pop(klass_RInfo);
|
||||
__ pop(k_RInfo);
|
||||
// result is a boolean
|
||||
__ cmpl(k_RInfo, 0);
|
||||
__ jcc(Assembler::equal, *stub->entry());
|
||||
__ bind(done);
|
||||
}
|
||||
|
||||
}
|
||||
if (dst != obj) {
|
||||
__ mov(dst, obj);
|
||||
}
|
||||
} else if (code == lir_instanceof) {
|
||||
Register obj = op->object()->as_register();
|
||||
Register k_RInfo = op->tmp1()->as_register();
|
||||
Register klass_RInfo = op->tmp2()->as_register();
|
||||
Register dst = op->result_opr()->as_register();
|
||||
ciKlass* k = op->klass();
|
||||
|
||||
Label done;
|
||||
Label zero;
|
||||
Label one;
|
||||
if (obj == k_RInfo) {
|
||||
k_RInfo = klass_RInfo;
|
||||
klass_RInfo = obj;
|
||||
}
|
||||
// patching may screw with our temporaries on sparc,
|
||||
// so let's do it before loading the class
|
||||
if (!k->is_loaded()) {
|
||||
jobject2reg_with_patching(k_RInfo, op->info_for_patch());
|
||||
} else {
|
||||
LP64_ONLY(__ movoop(k_RInfo, k->constant_encoding()));
|
||||
}
|
||||
assert(obj != k_RInfo, "must be different");
|
||||
|
||||
__ verify_oop(obj);
|
||||
if (op->fast_check()) {
|
||||
__ cmpptr(obj, (int32_t)NULL_WORD);
|
||||
__ jcc(Assembler::equal, zero);
|
||||
// get object class
|
||||
// not a safepoint as obj null check happens earlier
|
||||
if (LP64_ONLY(false &&) k->is_loaded()) {
|
||||
NOT_LP64(__ cmpoop(Address(obj, oopDesc::klass_offset_in_bytes()), k->constant_encoding()));
|
||||
k_RInfo = noreg;
|
||||
} else {
|
||||
__ cmpptr(k_RInfo, Address(obj, oopDesc::klass_offset_in_bytes()));
|
||||
|
||||
}
|
||||
__ jcc(Assembler::equal, one);
|
||||
} else {
|
||||
// get object class
|
||||
// not a safepoint as obj null check happens earlier
|
||||
__ cmpptr(obj, (int32_t)NULL_WORD);
|
||||
__ jcc(Assembler::equal, zero);
|
||||
__ movptr(klass_RInfo, Address(obj, oopDesc::klass_offset_in_bytes()));
|
||||
|
||||
#ifndef _LP64
|
||||
if (k->is_loaded()) {
|
||||
// See if we get an immediate positive hit
|
||||
__ cmpoop(Address(klass_RInfo, k->super_check_offset()), k->constant_encoding());
|
||||
__ jcc(Assembler::equal, one);
|
||||
if (sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes() == k->super_check_offset()) {
|
||||
// check for self
|
||||
__ cmpoop(klass_RInfo, k->constant_encoding());
|
||||
__ jcc(Assembler::equal, one);
|
||||
__ push(klass_RInfo);
|
||||
__ pushoop(k->constant_encoding());
|
||||
__ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
|
||||
__ pop(klass_RInfo);
|
||||
__ pop(dst);
|
||||
__ jmp(done);
|
||||
}
|
||||
}
|
||||
else // next block is unconditional if LP64:
|
||||
#endif // LP64
|
||||
{
|
||||
assert(dst != klass_RInfo && dst != k_RInfo, "need 3 registers");
|
||||
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, dst, &one, &zero, NULL);
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
__ push(klass_RInfo);
|
||||
__ push(k_RInfo);
|
||||
__ call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
|
||||
__ pop(klass_RInfo);
|
||||
__ pop(dst);
|
||||
__ jmp(done);
|
||||
}
|
||||
}
|
||||
__ bind(zero);
|
||||
__ xorptr(dst, dst);
|
||||
__ jmp(done);
|
||||
__ bind(one);
|
||||
__ movptr(dst, 1);
|
||||
__ bind(done);
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
} else
|
||||
if (code == lir_checkcast) {
|
||||
Register obj = op->object()->as_register();
|
||||
Register dst = op->result_opr()->as_register();
|
||||
Label success;
|
||||
emit_typecheck_helper(op, &success, op->stub()->entry(), &success);
|
||||
__ bind(success);
|
||||
if (dst != obj) {
|
||||
__ mov(dst, obj);
|
||||
}
|
||||
} else
|
||||
if (code == lir_instanceof) {
|
||||
Register obj = op->object()->as_register();
|
||||
Register dst = op->result_opr()->as_register();
|
||||
Label success, failure, done;
|
||||
emit_typecheck_helper(op, &success, &failure, &failure);
|
||||
__ bind(failure);
|
||||
__ xorptr(dst, dst);
|
||||
__ jmpb(done);
|
||||
__ bind(success);
|
||||
__ movptr(dst, 1);
|
||||
__ bind(done);
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1922,7 +1962,6 @@ void LIR_Assembler::emit_compare_and_swap(LIR_OpCompareAndSwap* op) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::cmove(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, LIR_Opr result) {
|
||||
Assembler::Condition acond, ncond;
|
||||
switch (condition) {
|
||||
@ -2014,11 +2053,11 @@ void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr
|
||||
jint c = right->as_constant_ptr()->as_jint();
|
||||
switch (code) {
|
||||
case lir_add: {
|
||||
__ increment(lreg, c);
|
||||
__ incrementl(lreg, c);
|
||||
break;
|
||||
}
|
||||
case lir_sub: {
|
||||
__ decrement(lreg, c);
|
||||
__ decrementl(lreg, c);
|
||||
break;
|
||||
}
|
||||
default: ShouldNotReachHere();
|
||||
@ -3253,13 +3292,13 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
// Perform additional virtual call profiling for invokevirtual and
|
||||
// invokeinterface bytecodes
|
||||
if ((bc == Bytecodes::_invokevirtual || bc == Bytecodes::_invokeinterface) &&
|
||||
Tier1ProfileVirtualCalls) {
|
||||
C1ProfileVirtualCalls) {
|
||||
assert(op->recv()->is_single_cpu(), "recv must be allocated");
|
||||
Register recv = op->recv()->as_register();
|
||||
assert_different_registers(mdo, recv);
|
||||
assert(data->is_VirtualCallData(), "need VirtualCallData for virtual calls");
|
||||
ciKlass* known_klass = op->known_holder();
|
||||
if (Tier1OptimizeVirtualCallProfiling && known_klass != NULL) {
|
||||
if (C1OptimizeVirtualCallProfiling && known_klass != NULL) {
|
||||
// We know the type that will be seen at this call site; we can
|
||||
// statically update the methodDataOop rather than needing to do
|
||||
// dynamic tests on the receiver type
|
||||
@ -3272,7 +3311,7 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
ciKlass* receiver = vc_data->receiver(i);
|
||||
if (known_klass->equals(receiver)) {
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)));
|
||||
__ addl(data_addr, DataLayout::counter_increment);
|
||||
__ addptr(data_addr, DataLayout::counter_increment);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -3288,49 +3327,26 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)));
|
||||
__ movoop(recv_addr, known_klass->constant_encoding());
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)));
|
||||
__ addl(data_addr, DataLayout::counter_increment);
|
||||
__ addptr(data_addr, DataLayout::counter_increment);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
__ movptr(recv, Address(recv, oopDesc::klass_offset_in_bytes()));
|
||||
Label update_done;
|
||||
uint i;
|
||||
for (i = 0; i < VirtualCallData::row_limit(); i++) {
|
||||
Label next_test;
|
||||
// See if the receiver is receiver[n].
|
||||
__ cmpptr(recv, Address(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i))));
|
||||
__ jcc(Assembler::notEqual, next_test);
|
||||
Address data_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i)));
|
||||
__ addl(data_addr, DataLayout::counter_increment);
|
||||
__ jmp(update_done);
|
||||
__ bind(next_test);
|
||||
}
|
||||
|
||||
// Didn't find receiver; find next empty slot and fill it in
|
||||
for (i = 0; i < VirtualCallData::row_limit(); i++) {
|
||||
Label next_test;
|
||||
Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)));
|
||||
__ cmpptr(recv_addr, (int32_t)NULL_WORD);
|
||||
__ jcc(Assembler::notEqual, next_test);
|
||||
__ movptr(recv_addr, recv);
|
||||
__ movl(Address(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_count_offset(i))), DataLayout::counter_increment);
|
||||
__ jmp(update_done);
|
||||
__ bind(next_test);
|
||||
}
|
||||
type_profile_helper(mdo, md, data, recv, &update_done);
|
||||
// Receiver did not match any saved receiver and there is no empty row for it.
|
||||
// Increment total counter to indicate polymorphic case.
|
||||
__ addl(counter_addr, DataLayout::counter_increment);
|
||||
__ addptr(counter_addr, DataLayout::counter_increment);
|
||||
|
||||
__ bind(update_done);
|
||||
}
|
||||
} else {
|
||||
// Static call
|
||||
__ addl(counter_addr, DataLayout::counter_increment);
|
||||
__ addptr(counter_addr, DataLayout::counter_increment);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::emit_delay(LIR_OpDelay*) {
|
||||
Unimplemented();
|
||||
}
|
||||
|
@ -42,7 +42,10 @@
|
||||
// method.
|
||||
Address as_Address(LIR_Address* addr, Register tmp);
|
||||
|
||||
|
||||
// Record the type of the receiver in ReceiverTypeData
|
||||
void type_profile_helper(Register mdo,
|
||||
ciMethodData *md, ciProfileData *data,
|
||||
Register recv, Label* update_done);
|
||||
public:
|
||||
|
||||
void store_parameter(Register r, int offset_from_esp_in_words);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2010, 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
|
||||
@ -182,10 +182,22 @@ LIR_Address* LIRGenerator::emit_array_address(LIR_Opr array_opr, LIR_Opr index_o
|
||||
}
|
||||
|
||||
|
||||
void LIRGenerator::increment_counter(address counter, int step) {
|
||||
LIR_Opr LIRGenerator::load_immediate(int x, BasicType type) {
|
||||
LIR_Opr r;
|
||||
if (type == T_LONG) {
|
||||
r = LIR_OprFact::longConst(x);
|
||||
} else if (type == T_INT) {
|
||||
r = LIR_OprFact::intConst(x);
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
void LIRGenerator::increment_counter(address counter, BasicType type, int step) {
|
||||
LIR_Opr pointer = new_pointer_register();
|
||||
__ move(LIR_OprFact::intptrConst(counter), pointer);
|
||||
LIR_Address* addr = new LIR_Address(pointer, T_INT);
|
||||
LIR_Address* addr = new LIR_Address(pointer, type);
|
||||
increment_counter(addr, step);
|
||||
}
|
||||
|
||||
@ -194,7 +206,6 @@ void LIRGenerator::increment_counter(LIR_Address* addr, int step) {
|
||||
__ add((LIR_Opr)addr, LIR_OprFact::intConst(step), (LIR_Opr)addr);
|
||||
}
|
||||
|
||||
|
||||
void LIRGenerator::cmp_mem_int(LIR_Condition condition, LIR_Opr base, int disp, int c, CodeEmitInfo* info) {
|
||||
__ cmp_mem_int(condition, base, disp, c, info);
|
||||
}
|
||||
@ -1145,10 +1156,10 @@ void LIRGenerator::do_InstanceOf(InstanceOf* x) {
|
||||
patching_info = state_for(x, x->state_before());
|
||||
}
|
||||
obj.load_item();
|
||||
LIR_Opr tmp = new_register(objectType);
|
||||
__ instanceof(reg, obj.result(), x->klass(),
|
||||
tmp, new_register(objectType), LIR_OprFact::illegalOpr,
|
||||
x->direct_compare(), patching_info);
|
||||
new_register(objectType), new_register(objectType),
|
||||
!x->klass()->is_loaded() ? new_register(objectType) : LIR_OprFact::illegalOpr,
|
||||
x->direct_compare(), patching_info, x->profiled_method(), x->profiled_bci());
|
||||
}
|
||||
|
||||
|
||||
@ -1188,8 +1199,7 @@ void LIRGenerator::do_If(If* x) {
|
||||
// add safepoint before generating condition code so it can be recomputed
|
||||
if (x->is_safepoint()) {
|
||||
// increment backedge counter if needed
|
||||
increment_backedge_counter(state_for(x, x->state_before()));
|
||||
|
||||
increment_backedge_counter(state_for(x, x->state_before()), x->profiled_bci());
|
||||
__ safepoint(LIR_OprFact::illegalOpr, state_for(x, x->state_before()));
|
||||
}
|
||||
set_no_result(x);
|
||||
@ -1197,6 +1207,7 @@ void LIRGenerator::do_If(If* x) {
|
||||
LIR_Opr left = xin->result();
|
||||
LIR_Opr right = yin->result();
|
||||
__ cmp(lir_cond(cond), left, right);
|
||||
// Generate branch profiling. Profiling code doesn't kill flags.
|
||||
profile_branch(x, cond);
|
||||
move_to_phi(x->state());
|
||||
if (x->x()->type()->is_float_kind()) {
|
||||
|
@ -1068,15 +1068,16 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
|
||||
break;
|
||||
|
||||
#ifdef TIERED
|
||||
case counter_overflow_id:
|
||||
{
|
||||
Register bci = rax;
|
||||
Register bci = rax, method = rbx;
|
||||
__ enter();
|
||||
OopMap* map = save_live_registers(sasm, 2);
|
||||
OopMap* map = save_live_registers(sasm, 3);
|
||||
// Retrieve bci
|
||||
__ movl(bci, Address(rbp, 2*BytesPerWord));
|
||||
int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, counter_overflow), bci);
|
||||
// And a pointer to the methodOop
|
||||
__ movptr(method, Address(rbp, 3*BytesPerWord));
|
||||
int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, counter_overflow), bci, method);
|
||||
oop_maps = new OopMapSet();
|
||||
oop_maps->add_gc_map(call_offset, map);
|
||||
restore_live_registers(sasm);
|
||||
@ -1084,7 +1085,6 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
__ ret(0);
|
||||
}
|
||||
break;
|
||||
#endif // TIERED
|
||||
|
||||
case new_type_array_id:
|
||||
case new_object_array_id:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -35,14 +35,7 @@ define_pd_global(bool, ProfileTraps, false);
|
||||
define_pd_global(bool, UseOnStackReplacement, true );
|
||||
define_pd_global(bool, TieredCompilation, false);
|
||||
define_pd_global(intx, CompileThreshold, 1500 );
|
||||
define_pd_global(intx, Tier2CompileThreshold, 1500 );
|
||||
define_pd_global(intx, Tier3CompileThreshold, 2500 );
|
||||
define_pd_global(intx, Tier4CompileThreshold, 4500 );
|
||||
|
||||
define_pd_global(intx, BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier2BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier3BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier4BackEdgeThreshold, 100000);
|
||||
|
||||
define_pd_global(intx, OnStackReplacePercentage, 933 );
|
||||
define_pd_global(intx, FreqInlineSize, 325 );
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2010, 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
|
||||
@ -39,19 +39,8 @@ define_pd_global(bool, ProfileInterpreter, false);
|
||||
define_pd_global(bool, ProfileInterpreter, true);
|
||||
#endif // CC_INTERP
|
||||
define_pd_global(bool, TieredCompilation, false);
|
||||
#ifdef TIERED
|
||||
define_pd_global(intx, CompileThreshold, 1000);
|
||||
#else
|
||||
define_pd_global(intx, CompileThreshold, 10000);
|
||||
#endif // TIERED
|
||||
define_pd_global(intx, Tier2CompileThreshold, 10000);
|
||||
define_pd_global(intx, Tier3CompileThreshold, 20000);
|
||||
define_pd_global(intx, Tier4CompileThreshold, 40000);
|
||||
|
||||
define_pd_global(intx, BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier2BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier3BackEdgeThreshold, 100000);
|
||||
define_pd_global(intx, Tier4BackEdgeThreshold, 100000);
|
||||
|
||||
define_pd_global(intx, OnStackReplacePercentage, 140);
|
||||
define_pd_global(intx, ConditionalMoveLimit, 3);
|
||||
|
@ -141,12 +141,12 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
}
|
||||
|
||||
// Could just be some random pointer within the codeBlob
|
||||
|
||||
if (!sender_blob->instructions_contains(sender_pc)) return false;
|
||||
if (!sender_blob->code_contains(sender_pc)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We should never be able to see an adapter if the current frame is something from code cache
|
||||
|
||||
if ( sender_blob->is_adapter_blob()) {
|
||||
if (sender_blob->is_adapter_blob()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -340,7 +340,7 @@ void frame::verify_deopt_original_pc(nmethod* nm, intptr_t* unextended_sp, bool
|
||||
fr._unextended_sp = unextended_sp;
|
||||
|
||||
address original_pc = nm->get_original_pc(&fr);
|
||||
assert(nm->code_contains(original_pc), "original PC must be in nmethod");
|
||||
assert(nm->insts_contains(original_pc), "original PC must be in nmethod");
|
||||
assert(nm->is_method_handle_return(original_pc) == is_method_handle_return, "must be");
|
||||
}
|
||||
#endif
|
||||
|
@ -63,7 +63,7 @@ inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address
|
||||
address original_pc = nmethod::get_deopt_original_pc(this);
|
||||
if (original_pc != NULL) {
|
||||
_pc = original_pc;
|
||||
assert(((nmethod*)_cb)->code_contains(_pc), "original PC must be in nmethod");
|
||||
assert(((nmethod*)_cb)->insts_contains(_pc), "original PC must be in nmethod");
|
||||
_deopt_state = is_deoptimized;
|
||||
} else {
|
||||
_deopt_state = not_deoptimized;
|
||||
|
@ -1397,3 +1397,17 @@ void InterpreterMacroAssembler::notify_method_exit(
|
||||
NOT_CC_INTERP(pop(state));
|
||||
}
|
||||
}
|
||||
|
||||
// Jump if ((*counter_addr += increment) & mask) satisfies the condition.
|
||||
void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
|
||||
int increment, int mask,
|
||||
Register scratch, bool preloaded,
|
||||
Condition cond, Label* where) {
|
||||
if (!preloaded) {
|
||||
movl(scratch, counter_addr);
|
||||
}
|
||||
incrementl(scratch, increment);
|
||||
movl(counter_addr, scratch);
|
||||
andl(scratch, mask);
|
||||
jcc(cond, *where);
|
||||
}
|
||||
|
@ -185,6 +185,10 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
bool decrement = false);
|
||||
void increment_mdp_data_at(Register mdp_in, Register reg, int constant,
|
||||
bool decrement = false);
|
||||
void increment_mask_and_jump(Address counter_addr,
|
||||
int increment, int mask,
|
||||
Register scratch, bool preloaded,
|
||||
Condition cond, Label* where);
|
||||
void set_mdp_flag_at(Register mdp_in, int flag_constant);
|
||||
void test_mdp_data_at(Register mdp_in, int offset, Register value,
|
||||
Register test_value_out,
|
||||
|
@ -1480,3 +1480,17 @@ void InterpreterMacroAssembler::notify_method_exit(
|
||||
NOT_CC_INTERP(pop(state));
|
||||
}
|
||||
}
|
||||
|
||||
// Jump if ((*counter_addr += increment) & mask) satisfies the condition.
|
||||
void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
|
||||
int increment, int mask,
|
||||
Register scratch, bool preloaded,
|
||||
Condition cond, Label* where) {
|
||||
if (!preloaded) {
|
||||
movl(scratch, counter_addr);
|
||||
}
|
||||
incrementl(scratch, increment);
|
||||
movl(counter_addr, scratch);
|
||||
andl(scratch, mask);
|
||||
jcc(cond, *where);
|
||||
}
|
||||
|
@ -194,6 +194,10 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
bool decrement = false);
|
||||
void increment_mdp_data_at(Register mdp_in, Register reg, int constant,
|
||||
bool decrement = false);
|
||||
void increment_mask_and_jump(Address counter_addr,
|
||||
int increment, int mask,
|
||||
Register scratch, bool preloaded,
|
||||
Condition cond, Label* where);
|
||||
void set_mdp_flag_at(Register mdp_in, int flag_constant);
|
||||
void test_mdp_data_at(Register mdp_in, int offset, Register value,
|
||||
Register test_value_out,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2010, 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
|
||||
@ -54,10 +54,10 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
ResourceMark rm;
|
||||
BufferBlob* b = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
address fast_entry = b->instructions_begin();
|
||||
CodeBuffer cbuf(fast_entry, b->instructions_size());
|
||||
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
CodeBuffer cbuf(blob);
|
||||
MacroAssembler* masm = new MacroAssembler(&cbuf);
|
||||
address fast_entry = __ pc();
|
||||
|
||||
Label slow;
|
||||
|
||||
@ -135,11 +135,11 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
return fast_entry;
|
||||
#else
|
||||
switch (type) {
|
||||
case T_BOOLEAN: jni_fast_GetBooleanField_fp = (GetBooleanField_t)fast_entry; break;
|
||||
case T_BYTE: jni_fast_GetByteField_fp = (GetByteField_t)fast_entry; break;
|
||||
case T_CHAR: jni_fast_GetCharField_fp = (GetCharField_t)fast_entry; break;
|
||||
case T_SHORT: jni_fast_GetShortField_fp = (GetShortField_t)fast_entry; break;
|
||||
case T_INT: jni_fast_GetIntField_fp = (GetIntField_t)fast_entry;
|
||||
case T_BOOLEAN: jni_fast_GetBooleanField_fp = (GetBooleanField_t) fast_entry; break;
|
||||
case T_BYTE: jni_fast_GetByteField_fp = (GetByteField_t) fast_entry; break;
|
||||
case T_CHAR: jni_fast_GetCharField_fp = (GetCharField_t) fast_entry; break;
|
||||
case T_SHORT: jni_fast_GetShortField_fp = (GetShortField_t) fast_entry; break;
|
||||
case T_INT: jni_fast_GetIntField_fp = (GetIntField_t) fast_entry; break;
|
||||
}
|
||||
return os::win32::fast_jni_accessor_wrapper(type);
|
||||
#endif
|
||||
@ -168,10 +168,10 @@ address JNI_FastGetField::generate_fast_get_int_field() {
|
||||
address JNI_FastGetField::generate_fast_get_long_field() {
|
||||
const char *name = "jni_fast_GetLongField";
|
||||
ResourceMark rm;
|
||||
BufferBlob* b = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
address fast_entry = b->instructions_begin();
|
||||
CodeBuffer cbuf(fast_entry, b->instructions_size());
|
||||
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
CodeBuffer cbuf(blob);
|
||||
MacroAssembler* masm = new MacroAssembler(&cbuf);
|
||||
address fast_entry = __ pc();
|
||||
|
||||
Label slow;
|
||||
|
||||
@ -246,7 +246,7 @@ address JNI_FastGetField::generate_fast_get_long_field() {
|
||||
#ifndef _WINDOWS
|
||||
return fast_entry;
|
||||
#else
|
||||
jni_fast_GetLongField_fp = (GetLongField_t)fast_entry;
|
||||
jni_fast_GetLongField_fp = (GetLongField_t) fast_entry;
|
||||
return os::win32::fast_jni_accessor_wrapper(T_LONG);
|
||||
#endif
|
||||
}
|
||||
@ -259,10 +259,10 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
ResourceMark rm;
|
||||
BufferBlob* b = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
address fast_entry = b->instructions_begin();
|
||||
CodeBuffer cbuf(fast_entry, b->instructions_size());
|
||||
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
|
||||
CodeBuffer cbuf(blob);
|
||||
MacroAssembler* masm = new MacroAssembler(&cbuf);
|
||||
address fast_entry = __ pc();
|
||||
|
||||
Label slow_with_pop, slow;
|
||||
|
||||
@ -348,8 +348,8 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
|
||||
return fast_entry;
|
||||
#else
|
||||
switch (type) {
|
||||
case T_FLOAT: jni_fast_GetFloatField_fp = (GetFloatField_t)fast_entry; break;
|
||||
case T_DOUBLE: jni_fast_GetDoubleField_fp = (GetDoubleField_t)fast_entry;
|
||||
case T_FLOAT: jni_fast_GetFloatField_fp = (GetFloatField_t) fast_entry; break;
|
||||
case T_DOUBLE: jni_fast_GetDoubleField_fp = (GetDoubleField_t) fast_entry; break;
|
||||
}
|
||||
return os::win32::fast_jni_accessor_wrapper(type);
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2010, 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
|
||||
@ -58,10 +58,10 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
ResourceMark rm;
|
||||
BufferBlob* b = BufferBlob::create(name, BUFFER_SIZE);
|
||||
address fast_entry = b->instructions_begin();
|
||||
CodeBuffer cbuf(fast_entry, b->instructions_size());
|
||||
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE);
|
||||
CodeBuffer cbuf(blob);
|
||||
MacroAssembler* masm = new MacroAssembler(&cbuf);
|
||||
address fast_entry = __ pc();
|
||||
|
||||
Label slow;
|
||||
|
||||
@ -156,10 +156,10 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
ResourceMark rm;
|
||||
BufferBlob* b = BufferBlob::create(name, BUFFER_SIZE);
|
||||
address fast_entry = b->instructions_begin();
|
||||
CodeBuffer cbuf(fast_entry, b->instructions_size());
|
||||
BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE);
|
||||
CodeBuffer cbuf(blob);
|
||||
MacroAssembler* masm = new MacroAssembler(&cbuf);
|
||||
address fast_entry = __ pc();
|
||||
|
||||
Label slow;
|
||||
|
||||
|
@ -27,6 +27,14 @@
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
#ifdef PRODUCT
|
||||
#define BLOCK_COMMENT(str) /* nothing */
|
||||
#else
|
||||
#define BLOCK_COMMENT(str) __ block_comment(str)
|
||||
#endif
|
||||
|
||||
#define BIND(label) bind(label); BLOCK_COMMENT(#label ":")
|
||||
|
||||
address MethodHandleEntry::start_compiled_entry(MacroAssembler* _masm,
|
||||
address interpreted_entry) {
|
||||
// Just before the actual machine code entry point, allocate space
|
||||
@ -64,6 +72,7 @@ static void verify_argslot(MacroAssembler* _masm, Register argslot_reg,
|
||||
const char* error_message) {
|
||||
// Verify that argslot lies within (rsp, rbp].
|
||||
Label L_ok, L_bad;
|
||||
BLOCK_COMMENT("{ verify_argslot");
|
||||
__ cmpptr(argslot_reg, rbp);
|
||||
__ jccb(Assembler::above, L_bad);
|
||||
__ cmpptr(rsp, argslot_reg);
|
||||
@ -71,6 +80,7 @@ static void verify_argslot(MacroAssembler* _masm, Register argslot_reg,
|
||||
__ bind(L_bad);
|
||||
__ stop(error_message);
|
||||
__ bind(L_ok);
|
||||
BLOCK_COMMENT("} verify_argslot");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -80,16 +90,21 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
|
||||
// rbx: methodOop
|
||||
// rcx: receiver method handle (must load from sp[MethodTypeForm.vmslots])
|
||||
// rsi/r13: sender SP (must preserve; see prepare_to_jump_from_interpreted)
|
||||
// rdx: garbage temp, blown away
|
||||
// rdx, rdi: garbage temp, blown away
|
||||
|
||||
Register rbx_method = rbx;
|
||||
Register rcx_recv = rcx;
|
||||
Register rax_mtype = rax;
|
||||
Register rdx_temp = rdx;
|
||||
Register rdi_temp = rdi;
|
||||
|
||||
// emit WrongMethodType path first, to enable jccb back-branch from main path
|
||||
Label wrong_method_type;
|
||||
__ bind(wrong_method_type);
|
||||
Label invoke_generic_slow_path;
|
||||
assert(methodOopDesc::intrinsic_id_size_in_bytes() == sizeof(u1), "");;
|
||||
__ cmpb(Address(rbx_method, methodOopDesc::intrinsic_id_offset_in_bytes()), (int) vmIntrinsics::_invokeExact);
|
||||
__ jcc(Assembler::notEqual, invoke_generic_slow_path);
|
||||
__ push(rax_mtype); // required mtype
|
||||
__ push(rcx_recv); // bad mh (1st stacked argument)
|
||||
__ jump(ExternalAddress(Interpreter::throw_WrongMethodType_entry()));
|
||||
@ -106,17 +121,68 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
|
||||
tem = rax_mtype; // in case there is another indirection
|
||||
}
|
||||
}
|
||||
Register rbx_temp = rbx_method; // done with incoming methodOop
|
||||
|
||||
// given the MethodType, find out where the MH argument is buried
|
||||
__ movptr(rdx_temp, Address(rax_mtype,
|
||||
__ delayed_value(java_dyn_MethodType::form_offset_in_bytes, rbx_temp)));
|
||||
__ movl(rdx_temp, Address(rdx_temp,
|
||||
__ delayed_value(java_dyn_MethodTypeForm::vmslots_offset_in_bytes, rbx_temp)));
|
||||
__ movptr(rcx_recv, __ argument_address(rdx_temp));
|
||||
__ delayed_value(java_dyn_MethodType::form_offset_in_bytes, rdi_temp)));
|
||||
Register rdx_vmslots = rdx_temp;
|
||||
__ movl(rdx_vmslots, Address(rdx_temp,
|
||||
__ delayed_value(java_dyn_MethodTypeForm::vmslots_offset_in_bytes, rdi_temp)));
|
||||
__ movptr(rcx_recv, __ argument_address(rdx_vmslots));
|
||||
|
||||
__ check_method_handle_type(rax_mtype, rcx_recv, rdx_temp, wrong_method_type);
|
||||
__ jump_to_method_handle_entry(rcx_recv, rdx_temp);
|
||||
trace_method_handle(_masm, "invokeExact");
|
||||
|
||||
__ check_method_handle_type(rax_mtype, rcx_recv, rdi_temp, wrong_method_type);
|
||||
__ jump_to_method_handle_entry(rcx_recv, rdi_temp);
|
||||
|
||||
// for invokeGeneric (only), apply argument and result conversions on the fly
|
||||
__ bind(invoke_generic_slow_path);
|
||||
#ifdef ASSERT
|
||||
{ Label L;
|
||||
__ cmpb(Address(rbx_method, methodOopDesc::intrinsic_id_offset_in_bytes()), (int) vmIntrinsics::_invokeGeneric);
|
||||
__ jcc(Assembler::equal, L);
|
||||
__ stop("bad methodOop::intrinsic_id");
|
||||
__ bind(L);
|
||||
}
|
||||
#endif //ASSERT
|
||||
Register rbx_temp = rbx_method; // don't need it now
|
||||
|
||||
// make room on the stack for another pointer:
|
||||
Register rcx_argslot = rcx_recv;
|
||||
__ lea(rcx_argslot, __ argument_address(rdx_vmslots, 1));
|
||||
insert_arg_slots(_masm, 2 * stack_move_unit(), _INSERT_REF_MASK,
|
||||
rcx_argslot, rbx_temp, rdx_temp);
|
||||
|
||||
// load up an adapter from the calling type (Java weaves this)
|
||||
__ movptr(rdx_temp, Address(rax_mtype,
|
||||
__ delayed_value(java_dyn_MethodType::form_offset_in_bytes, rdi_temp)));
|
||||
Register rdx_adapter = rdx_temp;
|
||||
// movptr(rdx_adapter, Address(rdx_temp, java_dyn_MethodTypeForm::genericInvoker_offset_in_bytes()));
|
||||
// deal with old JDK versions:
|
||||
__ lea(rdi_temp, Address(rdx_temp,
|
||||
__ delayed_value(java_dyn_MethodTypeForm::genericInvoker_offset_in_bytes, rdi_temp)));
|
||||
__ cmpptr(rdi_temp, rdx_temp);
|
||||
Label sorry_no_invoke_generic;
|
||||
__ jccb(Assembler::below, sorry_no_invoke_generic);
|
||||
|
||||
__ movptr(rdx_adapter, Address(rdi_temp, 0));
|
||||
__ testptr(rdx_adapter, rdx_adapter);
|
||||
__ jccb(Assembler::zero, sorry_no_invoke_generic);
|
||||
__ movptr(Address(rcx_argslot, 1 * Interpreter::stackElementSize), rdx_adapter);
|
||||
// As a trusted first argument, pass the type being called, so the adapter knows
|
||||
// the actual types of the arguments and return values.
|
||||
// (Generic invokers are shared among form-families of method-type.)
|
||||
__ movptr(Address(rcx_argslot, 0 * Interpreter::stackElementSize), rax_mtype);
|
||||
// FIXME: assert that rdx_adapter is of the right method-type.
|
||||
__ mov(rcx, rdx_adapter);
|
||||
trace_method_handle(_masm, "invokeGeneric");
|
||||
__ jump_to_method_handle_entry(rcx, rdi_temp);
|
||||
|
||||
__ bind(sorry_no_invoke_generic); // no invokeGeneric implementation available!
|
||||
__ movptr(rcx_recv, Address(rcx_argslot, -1 * Interpreter::stackElementSize)); // recover original MH
|
||||
__ push(rax_mtype); // required mtype
|
||||
__ push(rcx_recv); // bad mh (1st stacked argument)
|
||||
__ jump(ExternalAddress(Interpreter::throw_WrongMethodType_entry()));
|
||||
|
||||
return entry_point;
|
||||
}
|
||||
@ -164,11 +230,12 @@ void MethodHandles::insert_arg_slots(MacroAssembler* _masm,
|
||||
// for (rdx = rsp + size; rdx < argslot; rdx++)
|
||||
// rdx[-size] = rdx[0]
|
||||
// argslot -= size;
|
||||
BLOCK_COMMENT("insert_arg_slots {");
|
||||
__ mov(rdx_temp, rsp); // source pointer for copy
|
||||
__ lea(rsp, Address(rsp, arg_slots, Address::times_ptr));
|
||||
{
|
||||
Label loop;
|
||||
__ bind(loop);
|
||||
__ BIND(loop);
|
||||
// pull one word down each time through the loop
|
||||
__ movptr(rbx_temp, Address(rdx_temp, 0));
|
||||
__ movptr(Address(rdx_temp, arg_slots, Address::times_ptr), rbx_temp);
|
||||
@ -179,6 +246,7 @@ void MethodHandles::insert_arg_slots(MacroAssembler* _masm,
|
||||
|
||||
// Now move the argslot down, to point to the opened-up space.
|
||||
__ lea(rax_argslot, Address(rax_argslot, arg_slots, Address::times_ptr));
|
||||
BLOCK_COMMENT("} insert_arg_slots");
|
||||
}
|
||||
|
||||
// Helper to remove argument slots from the stack.
|
||||
@ -218,6 +286,7 @@ void MethodHandles::remove_arg_slots(MacroAssembler* _masm,
|
||||
}
|
||||
#endif
|
||||
|
||||
BLOCK_COMMENT("remove_arg_slots {");
|
||||
// Pull up everything shallower than rax_argslot.
|
||||
// Then remove the excess space on the stack.
|
||||
// The stacked return address gets pulled up with everything else.
|
||||
@ -229,7 +298,7 @@ void MethodHandles::remove_arg_slots(MacroAssembler* _masm,
|
||||
__ lea(rdx_temp, Address(rax_argslot, -wordSize)); // source pointer for copy
|
||||
{
|
||||
Label loop;
|
||||
__ bind(loop);
|
||||
__ BIND(loop);
|
||||
// pull one word up each time through the loop
|
||||
__ movptr(rbx_temp, Address(rdx_temp, 0));
|
||||
__ movptr(Address(rdx_temp, arg_slots, Address::times_ptr), rbx_temp);
|
||||
@ -242,12 +311,14 @@ void MethodHandles::remove_arg_slots(MacroAssembler* _masm,
|
||||
__ lea(rsp, Address(rsp, arg_slots, Address::times_ptr));
|
||||
// And adjust the argslot address to point at the deletion point.
|
||||
__ lea(rax_argslot, Address(rax_argslot, arg_slots, Address::times_ptr));
|
||||
BLOCK_COMMENT("} remove_arg_slots");
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
extern "C" void print_method_handle(oop mh);
|
||||
void trace_method_handle_stub(const char* adaptername,
|
||||
oop mh,
|
||||
intptr_t* saved_regs,
|
||||
intptr_t* entry_sp,
|
||||
intptr_t* saved_sp,
|
||||
intptr_t* saved_bp) {
|
||||
@ -256,9 +327,47 @@ void trace_method_handle_stub(const char* adaptername,
|
||||
intptr_t* base_sp = (intptr_t*) saved_bp[frame::interpreter_frame_monitor_block_top_offset];
|
||||
printf("MH %s mh="INTPTR_FORMAT" sp=("INTPTR_FORMAT"+"INTX_FORMAT") stack_size="INTX_FORMAT" bp="INTPTR_FORMAT"\n",
|
||||
adaptername, (intptr_t)mh, (intptr_t)entry_sp, (intptr_t)(saved_sp - entry_sp), (intptr_t)(base_sp - last_sp), (intptr_t)saved_bp);
|
||||
if (last_sp != saved_sp)
|
||||
if (last_sp != saved_sp && last_sp != NULL)
|
||||
printf("*** last_sp="INTPTR_FORMAT"\n", (intptr_t)last_sp);
|
||||
if (Verbose) print_method_handle(mh);
|
||||
if (Verbose) {
|
||||
printf(" reg dump: ");
|
||||
int saved_regs_count = (entry_sp-1) - saved_regs;
|
||||
// 32 bit: rdi rsi rbp rsp; rbx rdx rcx (*) rax
|
||||
int i;
|
||||
for (i = 0; i <= saved_regs_count; i++) {
|
||||
if (i > 0 && i % 4 == 0 && i != saved_regs_count)
|
||||
printf("\n + dump: ");
|
||||
printf(" %d: "INTPTR_FORMAT, i, saved_regs[i]);
|
||||
}
|
||||
printf("\n");
|
||||
int stack_dump_count = 16;
|
||||
if (stack_dump_count < (int)(saved_bp + 2 - saved_sp))
|
||||
stack_dump_count = (int)(saved_bp + 2 - saved_sp);
|
||||
if (stack_dump_count > 64) stack_dump_count = 48;
|
||||
for (i = 0; i < stack_dump_count; i += 4) {
|
||||
printf(" dump at SP[%d] "INTPTR_FORMAT": "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT"\n",
|
||||
i, &entry_sp[i+0], entry_sp[i+0], entry_sp[i+1], entry_sp[i+2], entry_sp[i+3]);
|
||||
}
|
||||
print_method_handle(mh);
|
||||
}
|
||||
}
|
||||
void MethodHandles::trace_method_handle(MacroAssembler* _masm, const char* adaptername) {
|
||||
if (!TraceMethodHandles) return;
|
||||
BLOCK_COMMENT("trace_method_handle {");
|
||||
__ push(rax);
|
||||
__ lea(rax, Address(rsp, wordSize*6)); // entry_sp
|
||||
__ pusha();
|
||||
// arguments:
|
||||
__ push(rbp); // interpreter frame pointer
|
||||
__ push(rsi); // saved_sp
|
||||
__ push(rax); // entry_sp
|
||||
__ push(rcx); // mh
|
||||
__ push(rcx);
|
||||
__ movptr(Address(rsp, 0), (intptr_t) adaptername);
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, trace_method_handle_stub), 5);
|
||||
__ popa();
|
||||
__ pop(rax);
|
||||
BLOCK_COMMENT("} trace_method_handle");
|
||||
}
|
||||
#endif //PRODUCT
|
||||
|
||||
@ -324,21 +433,9 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan
|
||||
address interp_entry = __ pc();
|
||||
if (UseCompressedOops) __ unimplemented("UseCompressedOops");
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (TraceMethodHandles) {
|
||||
__ push(rax); __ push(rbx); __ push(rcx); __ push(rdx); __ push(rsi); __ push(rdi);
|
||||
__ lea(rax, Address(rsp, wordSize*6)); // entry_sp
|
||||
// arguments:
|
||||
__ push(rbp); // interpreter frame pointer
|
||||
__ push(rsi); // saved_sp
|
||||
__ push(rax); // entry_sp
|
||||
__ push(rcx); // mh
|
||||
__ push(rcx);
|
||||
__ movptr(Address(rsp, 0), (intptr_t)entry_name(ek));
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, trace_method_handle_stub), 5);
|
||||
__ pop(rdi); __ pop(rsi); __ pop(rdx); __ pop(rcx); __ pop(rbx); __ pop(rax);
|
||||
}
|
||||
#endif //PRODUCT
|
||||
trace_method_handle(_masm, entry_name(ek));
|
||||
|
||||
BLOCK_COMMENT(entry_name(ek));
|
||||
|
||||
switch ((int) ek) {
|
||||
case _raise_exception:
|
||||
|
@ -1039,6 +1039,33 @@ class StubGenerator: public StubCodeGenerator {
|
||||
}
|
||||
|
||||
|
||||
address generate_fill(BasicType t, bool aligned, const char *name) {
|
||||
__ align(CodeEntryAlignment);
|
||||
StubCodeMark mark(this, "StubRoutines", name);
|
||||
address start = __ pc();
|
||||
|
||||
BLOCK_COMMENT("Entry:");
|
||||
|
||||
const Register to = rdi; // source array address
|
||||
const Register value = rdx; // value
|
||||
const Register count = rsi; // elements count
|
||||
|
||||
__ enter(); // required for proper stackwalking of RuntimeStub frame
|
||||
__ push(rsi);
|
||||
__ push(rdi);
|
||||
__ movptr(to , Address(rsp, 12+ 4));
|
||||
__ movl(value, Address(rsp, 12+ 8));
|
||||
__ movl(count, Address(rsp, 12+ 12));
|
||||
|
||||
__ generate_fill(t, aligned, to, value, count, rax, xmm0);
|
||||
|
||||
__ pop(rdi);
|
||||
__ pop(rsi);
|
||||
__ leave(); // required for proper stackwalking of RuntimeStub frame
|
||||
__ ret(0);
|
||||
return start;
|
||||
}
|
||||
|
||||
address generate_conjoint_copy(BasicType t, bool aligned,
|
||||
Address::ScaleFactor sf,
|
||||
address nooverlap_target,
|
||||
@ -2001,6 +2028,13 @@ class StubGenerator: public StubCodeGenerator {
|
||||
generate_conjoint_long_copy(entry, &entry_jlong_arraycopy,
|
||||
"jlong_arraycopy");
|
||||
|
||||
StubRoutines::_jbyte_fill = generate_fill(T_BYTE, false, "jbyte_fill");
|
||||
StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill");
|
||||
StubRoutines::_jint_fill = generate_fill(T_INT, false, "jint_fill");
|
||||
StubRoutines::_arrayof_jbyte_fill = generate_fill(T_BYTE, true, "arrayof_jbyte_fill");
|
||||
StubRoutines::_arrayof_jshort_fill = generate_fill(T_SHORT, true, "arrayof_jshort_fill");
|
||||
StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill");
|
||||
|
||||
StubRoutines::_arrayof_jint_disjoint_arraycopy =
|
||||
StubRoutines::_jint_disjoint_arraycopy;
|
||||
StubRoutines::_arrayof_oop_disjoint_arraycopy =
|
||||
|
@ -1625,6 +1625,26 @@ class StubGenerator: public StubCodeGenerator {
|
||||
return start;
|
||||
}
|
||||
|
||||
address generate_fill(BasicType t, bool aligned, const char *name) {
|
||||
__ align(CodeEntryAlignment);
|
||||
StubCodeMark mark(this, "StubRoutines", name);
|
||||
address start = __ pc();
|
||||
|
||||
BLOCK_COMMENT("Entry:");
|
||||
|
||||
const Register to = c_rarg0; // source array address
|
||||
const Register value = c_rarg1; // value
|
||||
const Register count = c_rarg2; // elements count
|
||||
|
||||
__ enter(); // required for proper stackwalking of RuntimeStub frame
|
||||
|
||||
__ generate_fill(t, aligned, to, value, count, rax, xmm0);
|
||||
|
||||
__ leave(); // required for proper stackwalking of RuntimeStub frame
|
||||
__ ret(0);
|
||||
return start;
|
||||
}
|
||||
|
||||
// Arguments:
|
||||
// aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
|
||||
// ignored
|
||||
@ -2712,6 +2732,13 @@ class StubGenerator: public StubCodeGenerator {
|
||||
StubRoutines::_unsafe_arraycopy = generate_unsafe_copy("unsafe_arraycopy");
|
||||
StubRoutines::_generic_arraycopy = generate_generic_copy("generic_arraycopy");
|
||||
|
||||
StubRoutines::_jbyte_fill = generate_fill(T_BYTE, false, "jbyte_fill");
|
||||
StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill");
|
||||
StubRoutines::_jint_fill = generate_fill(T_INT, false, "jint_fill");
|
||||
StubRoutines::_arrayof_jbyte_fill = generate_fill(T_BYTE, true, "arrayof_jbyte_fill");
|
||||
StubRoutines::_arrayof_jshort_fill = generate_fill(T_SHORT, true, "arrayof_jshort_fill");
|
||||
StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill");
|
||||
|
||||
// We don't generate specialized code for HeapWord-aligned source
|
||||
// arrays, so just use the code we've already generated
|
||||
StubRoutines::_arrayof_jbyte_disjoint_arraycopy = StubRoutines::_jbyte_disjoint_arraycopy;
|
||||
|
@ -33,7 +33,7 @@ enum platform_dependent_constants {
|
||||
|
||||
// MethodHandles adapters
|
||||
enum method_handles_platform_dependent_constants {
|
||||
method_handles_adapters_code_size = 5000
|
||||
method_handles_adapters_code_size = 10000
|
||||
};
|
||||
|
||||
class x86 {
|
||||
|
@ -35,7 +35,7 @@ enum platform_dependent_constants {
|
||||
|
||||
// MethodHandles adapters
|
||||
enum method_handles_platform_dependent_constants {
|
||||
method_handles_adapters_code_size = 13000
|
||||
method_handles_adapters_code_size = 26000
|
||||
};
|
||||
|
||||
class x86 {
|
||||
|
@ -359,40 +359,62 @@ address TemplateInterpreterGenerator::generate_safept_entry_for(TosState state,
|
||||
// rcx: invocation counter
|
||||
//
|
||||
void InterpreterGenerator::generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue) {
|
||||
const Address invocation_counter(rbx, in_bytes(methodOopDesc::invocation_counter_offset()) +
|
||||
in_bytes(InvocationCounter::counter_offset()));
|
||||
// Note: In tiered we increment either counters in methodOop or in MDO depending if we're profiling or not.
|
||||
if (TieredCompilation) {
|
||||
int increment = InvocationCounter::count_increment;
|
||||
int mask = ((1 << Tier0InvokeNotifyFreqLog) - 1) << InvocationCounter::count_shift;
|
||||
Label no_mdo, done;
|
||||
if (ProfileInterpreter) {
|
||||
// Are we profiling?
|
||||
__ movptr(rax, Address(rbx, methodOopDesc::method_data_offset()));
|
||||
__ testptr(rax, rax);
|
||||
__ jccb(Assembler::zero, no_mdo);
|
||||
// Increment counter in the MDO
|
||||
const Address mdo_invocation_counter(rax, in_bytes(methodDataOopDesc::invocation_counter_offset()) +
|
||||
in_bytes(InvocationCounter::counter_offset()));
|
||||
__ increment_mask_and_jump(mdo_invocation_counter, increment, mask, rcx, false, Assembler::zero, overflow);
|
||||
__ jmpb(done);
|
||||
}
|
||||
__ bind(no_mdo);
|
||||
// Increment counter in methodOop (we don't need to load it, it's in rcx).
|
||||
__ increment_mask_and_jump(invocation_counter, increment, mask, rcx, true, Assembler::zero, overflow);
|
||||
__ bind(done);
|
||||
} else {
|
||||
const Address backedge_counter (rbx, methodOopDesc::backedge_counter_offset() +
|
||||
InvocationCounter::counter_offset());
|
||||
|
||||
const Address invocation_counter(rbx, methodOopDesc::invocation_counter_offset() + InvocationCounter::counter_offset());
|
||||
const Address backedge_counter (rbx, methodOopDesc::backedge_counter_offset() + InvocationCounter::counter_offset());
|
||||
if (ProfileInterpreter) { // %%% Merge this into methodDataOop
|
||||
__ incrementl(Address(rbx,methodOopDesc::interpreter_invocation_counter_offset()));
|
||||
}
|
||||
// Update standard invocation counters
|
||||
__ movl(rax, backedge_counter); // load backedge counter
|
||||
|
||||
if (ProfileInterpreter) { // %%% Merge this into methodDataOop
|
||||
__ incrementl(Address(rbx,methodOopDesc::interpreter_invocation_counter_offset()));
|
||||
}
|
||||
// Update standard invocation counters
|
||||
__ movl(rax, backedge_counter); // load backedge counter
|
||||
__ incrementl(rcx, InvocationCounter::count_increment);
|
||||
__ andl(rax, InvocationCounter::count_mask_value); // mask out the status bits
|
||||
|
||||
__ incrementl(rcx, InvocationCounter::count_increment);
|
||||
__ andl(rax, InvocationCounter::count_mask_value); // mask out the status bits
|
||||
__ movl(invocation_counter, rcx); // save invocation count
|
||||
__ addl(rcx, rax); // add both counters
|
||||
|
||||
__ movl(invocation_counter, rcx); // save invocation count
|
||||
__ addl(rcx, rax); // add both counters
|
||||
// profile_method is non-null only for interpreted method so
|
||||
// profile_method != NULL == !native_call
|
||||
// BytecodeInterpreter only calls for native so code is elided.
|
||||
|
||||
// profile_method is non-null only for interpreted method so
|
||||
// profile_method != NULL == !native_call
|
||||
// BytecodeInterpreter only calls for native so code is elided.
|
||||
if (ProfileInterpreter && profile_method != NULL) {
|
||||
// Test to see if we should create a method data oop
|
||||
__ cmp32(rcx,
|
||||
ExternalAddress((address)&InvocationCounter::InterpreterProfileLimit));
|
||||
__ jcc(Assembler::less, *profile_method_continue);
|
||||
|
||||
// if no method data exists, go to profile_method
|
||||
__ test_method_data_pointer(rax, *profile_method);
|
||||
}
|
||||
|
||||
if (ProfileInterpreter && profile_method != NULL) {
|
||||
// Test to see if we should create a method data oop
|
||||
__ cmp32(rcx,
|
||||
ExternalAddress((address)&InvocationCounter::InterpreterProfileLimit));
|
||||
__ jcc(Assembler::less, *profile_method_continue);
|
||||
|
||||
// if no method data exists, go to profile_method
|
||||
__ test_method_data_pointer(rax, *profile_method);
|
||||
ExternalAddress((address)&InvocationCounter::InterpreterInvocationLimit));
|
||||
__ jcc(Assembler::aboveEqual, *overflow);
|
||||
}
|
||||
|
||||
__ cmp32(rcx,
|
||||
ExternalAddress((address)&InvocationCounter::InterpreterInvocationLimit));
|
||||
__ jcc(Assembler::aboveEqual, *overflow);
|
||||
|
||||
}
|
||||
|
||||
void InterpreterGenerator::generate_counter_overflow(Label* do_continue) {
|
||||
|
@ -310,42 +310,61 @@ void InterpreterGenerator::generate_counter_incr(
|
||||
Label* overflow,
|
||||
Label* profile_method,
|
||||
Label* profile_method_continue) {
|
||||
|
||||
const Address invocation_counter(rbx,
|
||||
methodOopDesc::invocation_counter_offset() +
|
||||
const Address invocation_counter(rbx, in_bytes(methodOopDesc::invocation_counter_offset()) +
|
||||
in_bytes(InvocationCounter::counter_offset()));
|
||||
// Note: In tiered we increment either counters in methodOop or in MDO depending if we're profiling or not.
|
||||
if (TieredCompilation) {
|
||||
int increment = InvocationCounter::count_increment;
|
||||
int mask = ((1 << Tier0InvokeNotifyFreqLog) - 1) << InvocationCounter::count_shift;
|
||||
Label no_mdo, done;
|
||||
if (ProfileInterpreter) {
|
||||
// Are we profiling?
|
||||
__ movptr(rax, Address(rbx, methodOopDesc::method_data_offset()));
|
||||
__ testptr(rax, rax);
|
||||
__ jccb(Assembler::zero, no_mdo);
|
||||
// Increment counter in the MDO
|
||||
const Address mdo_invocation_counter(rax, in_bytes(methodDataOopDesc::invocation_counter_offset()) +
|
||||
in_bytes(InvocationCounter::counter_offset()));
|
||||
__ increment_mask_and_jump(mdo_invocation_counter, increment, mask, rcx, false, Assembler::zero, overflow);
|
||||
__ jmpb(done);
|
||||
}
|
||||
__ bind(no_mdo);
|
||||
// Increment counter in methodOop (we don't need to load it, it's in ecx).
|
||||
__ increment_mask_and_jump(invocation_counter, increment, mask, rcx, true, Assembler::zero, overflow);
|
||||
__ bind(done);
|
||||
} else {
|
||||
const Address backedge_counter(rbx,
|
||||
methodOopDesc::backedge_counter_offset() +
|
||||
InvocationCounter::counter_offset());
|
||||
const Address backedge_counter(rbx,
|
||||
methodOopDesc::backedge_counter_offset() +
|
||||
InvocationCounter::counter_offset());
|
||||
|
||||
if (ProfileInterpreter) { // %%% Merge this into methodDataOop
|
||||
__ incrementl(Address(rbx,
|
||||
methodOopDesc::interpreter_invocation_counter_offset()));
|
||||
if (ProfileInterpreter) { // %%% Merge this into methodDataOop
|
||||
__ incrementl(Address(rbx,
|
||||
methodOopDesc::interpreter_invocation_counter_offset()));
|
||||
}
|
||||
// Update standard invocation counters
|
||||
__ movl(rax, backedge_counter); // load backedge counter
|
||||
|
||||
__ incrementl(rcx, InvocationCounter::count_increment);
|
||||
__ andl(rax, InvocationCounter::count_mask_value); // mask out the status bits
|
||||
|
||||
__ movl(invocation_counter, rcx); // save invocation count
|
||||
__ addl(rcx, rax); // add both counters
|
||||
|
||||
// profile_method is non-null only for interpreted method so
|
||||
// profile_method != NULL == !native_call
|
||||
|
||||
if (ProfileInterpreter && profile_method != NULL) {
|
||||
// Test to see if we should create a method data oop
|
||||
__ cmp32(rcx, ExternalAddress((address)&InvocationCounter::InterpreterProfileLimit));
|
||||
__ jcc(Assembler::less, *profile_method_continue);
|
||||
|
||||
// if no method data exists, go to profile_method
|
||||
__ test_method_data_pointer(rax, *profile_method);
|
||||
}
|
||||
|
||||
__ cmp32(rcx, ExternalAddress((address)&InvocationCounter::InterpreterInvocationLimit));
|
||||
__ jcc(Assembler::aboveEqual, *overflow);
|
||||
}
|
||||
// Update standard invocation counters
|
||||
__ movl(rax, backedge_counter); // load backedge counter
|
||||
|
||||
__ incrementl(rcx, InvocationCounter::count_increment);
|
||||
__ andl(rax, InvocationCounter::count_mask_value); // mask out the
|
||||
// status bits
|
||||
|
||||
__ movl(invocation_counter, rcx); // save invocation count
|
||||
__ addl(rcx, rax); // add both counters
|
||||
|
||||
// profile_method is non-null only for interpreted method so
|
||||
// profile_method != NULL == !native_call
|
||||
|
||||
if (ProfileInterpreter && profile_method != NULL) {
|
||||
// Test to see if we should create a method data oop
|
||||
__ cmp32(rcx, ExternalAddress((address)&InvocationCounter::InterpreterProfileLimit));
|
||||
__ jcc(Assembler::less, *profile_method_continue);
|
||||
|
||||
// if no method data exists, go to profile_method
|
||||
__ test_method_data_pointer(rax, *profile_method);
|
||||
}
|
||||
|
||||
__ cmp32(rcx, ExternalAddress((address)&InvocationCounter::InterpreterInvocationLimit));
|
||||
__ jcc(Assembler::aboveEqual, *overflow);
|
||||
}
|
||||
|
||||
void InterpreterGenerator::generate_counter_overflow(Label* do_continue) {
|
||||
|
@ -1558,47 +1558,68 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
|
||||
__ testl(rdx, rdx); // check if forward or backward branch
|
||||
__ jcc(Assembler::positive, dispatch); // count only if backward branch
|
||||
|
||||
// increment counter
|
||||
__ movl(rax, Address(rcx, be_offset)); // load backedge counter
|
||||
__ incrementl(rax, InvocationCounter::count_increment); // increment counter
|
||||
__ movl(Address(rcx, be_offset), rax); // store counter
|
||||
|
||||
__ movl(rax, Address(rcx, inv_offset)); // load invocation counter
|
||||
__ andl(rax, InvocationCounter::count_mask_value); // and the status bits
|
||||
__ addl(rax, Address(rcx, be_offset)); // add both counters
|
||||
|
||||
if (ProfileInterpreter) {
|
||||
// Test to see if we should create a method data oop
|
||||
__ cmp32(rax,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterProfileLimit));
|
||||
__ jcc(Assembler::less, dispatch);
|
||||
|
||||
// if no method data exists, go to profile method
|
||||
__ test_method_data_pointer(rax, profile_method);
|
||||
|
||||
if (UseOnStackReplacement) {
|
||||
// check for overflow against rbx, which is the MDO taken count
|
||||
__ cmp32(rbx,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterBackwardBranchLimit));
|
||||
__ jcc(Assembler::below, dispatch);
|
||||
|
||||
// When ProfileInterpreter is on, the backedge_count comes from the
|
||||
// methodDataOop, which value does not get reset on the call to
|
||||
// frequency_counter_overflow(). To avoid excessive calls to the overflow
|
||||
// routine while the method is being compiled, add a second test to make
|
||||
// sure the overflow function is called only once every overflow_frequency.
|
||||
const int overflow_frequency = 1024;
|
||||
__ andptr(rbx, overflow_frequency-1);
|
||||
__ jcc(Assembler::zero, backedge_counter_overflow);
|
||||
|
||||
if (TieredCompilation) {
|
||||
Label no_mdo;
|
||||
int increment = InvocationCounter::count_increment;
|
||||
int mask = ((1 << Tier0BackedgeNotifyFreqLog) - 1) << InvocationCounter::count_shift;
|
||||
if (ProfileInterpreter) {
|
||||
// Are we profiling?
|
||||
__ movptr(rbx, Address(rcx, in_bytes(methodOopDesc::method_data_offset())));
|
||||
__ testptr(rbx, rbx);
|
||||
__ jccb(Assembler::zero, no_mdo);
|
||||
// Increment the MDO backedge counter
|
||||
const Address mdo_backedge_counter(rbx, in_bytes(methodDataOopDesc::backedge_counter_offset()) +
|
||||
in_bytes(InvocationCounter::counter_offset()));
|
||||
__ increment_mask_and_jump(mdo_backedge_counter, increment, mask,
|
||||
rax, false, Assembler::zero, &backedge_counter_overflow);
|
||||
__ jmp(dispatch);
|
||||
}
|
||||
__ bind(no_mdo);
|
||||
// Increment backedge counter in methodOop
|
||||
__ increment_mask_and_jump(Address(rcx, be_offset), increment, mask,
|
||||
rax, false, Assembler::zero, &backedge_counter_overflow);
|
||||
} else {
|
||||
if (UseOnStackReplacement) {
|
||||
// check for overflow against rax, which is the sum of the counters
|
||||
__ cmp32(rax,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterBackwardBranchLimit));
|
||||
__ jcc(Assembler::aboveEqual, backedge_counter_overflow);
|
||||
// increment counter
|
||||
__ movl(rax, Address(rcx, be_offset)); // load backedge counter
|
||||
__ incrementl(rax, InvocationCounter::count_increment); // increment counter
|
||||
__ movl(Address(rcx, be_offset), rax); // store counter
|
||||
|
||||
__ movl(rax, Address(rcx, inv_offset)); // load invocation counter
|
||||
__ andl(rax, InvocationCounter::count_mask_value); // and the status bits
|
||||
__ addl(rax, Address(rcx, be_offset)); // add both counters
|
||||
|
||||
if (ProfileInterpreter) {
|
||||
// Test to see if we should create a method data oop
|
||||
__ cmp32(rax,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterProfileLimit));
|
||||
__ jcc(Assembler::less, dispatch);
|
||||
|
||||
// if no method data exists, go to profile method
|
||||
__ test_method_data_pointer(rax, profile_method);
|
||||
|
||||
if (UseOnStackReplacement) {
|
||||
// check for overflow against rbx, which is the MDO taken count
|
||||
__ cmp32(rbx,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterBackwardBranchLimit));
|
||||
__ jcc(Assembler::below, dispatch);
|
||||
|
||||
// When ProfileInterpreter is on, the backedge_count comes from the
|
||||
// methodDataOop, which value does not get reset on the call to
|
||||
// frequency_counter_overflow(). To avoid excessive calls to the overflow
|
||||
// routine while the method is being compiled, add a second test to make
|
||||
// sure the overflow function is called only once every overflow_frequency.
|
||||
const int overflow_frequency = 1024;
|
||||
__ andptr(rbx, overflow_frequency-1);
|
||||
__ jcc(Assembler::zero, backedge_counter_overflow);
|
||||
}
|
||||
} else {
|
||||
if (UseOnStackReplacement) {
|
||||
// check for overflow against rax, which is the sum of the counters
|
||||
__ cmp32(rax,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterBackwardBranchLimit));
|
||||
__ jcc(Assembler::aboveEqual, backedge_counter_overflow);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
__ bind(dispatch);
|
||||
|
@ -1583,51 +1583,71 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
|
||||
// r14: locals pointer
|
||||
__ testl(rdx, rdx); // check if forward or backward branch
|
||||
__ jcc(Assembler::positive, dispatch); // count only if backward branch
|
||||
|
||||
// increment counter
|
||||
__ movl(rax, Address(rcx, be_offset)); // load backedge counter
|
||||
__ incrementl(rax, InvocationCounter::count_increment); // increment
|
||||
// counter
|
||||
__ movl(Address(rcx, be_offset), rax); // store counter
|
||||
|
||||
__ movl(rax, Address(rcx, inv_offset)); // load invocation counter
|
||||
__ andl(rax, InvocationCounter::count_mask_value); // and the status bits
|
||||
__ addl(rax, Address(rcx, be_offset)); // add both counters
|
||||
|
||||
if (ProfileInterpreter) {
|
||||
// Test to see if we should create a method data oop
|
||||
__ cmp32(rax,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterProfileLimit));
|
||||
__ jcc(Assembler::less, dispatch);
|
||||
|
||||
// if no method data exists, go to profile method
|
||||
__ test_method_data_pointer(rax, profile_method);
|
||||
|
||||
if (UseOnStackReplacement) {
|
||||
// check for overflow against ebx which is the MDO taken count
|
||||
__ cmp32(rbx,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterBackwardBranchLimit));
|
||||
__ jcc(Assembler::below, dispatch);
|
||||
|
||||
// When ProfileInterpreter is on, the backedge_count comes
|
||||
// from the methodDataOop, which value does not get reset on
|
||||
// the call to frequency_counter_overflow(). To avoid
|
||||
// excessive calls to the overflow routine while the method is
|
||||
// being compiled, add a second test to make sure the overflow
|
||||
// function is called only once every overflow_frequency.
|
||||
const int overflow_frequency = 1024;
|
||||
__ andl(rbx, overflow_frequency - 1);
|
||||
__ jcc(Assembler::zero, backedge_counter_overflow);
|
||||
|
||||
if (TieredCompilation) {
|
||||
Label no_mdo;
|
||||
int increment = InvocationCounter::count_increment;
|
||||
int mask = ((1 << Tier0BackedgeNotifyFreqLog) - 1) << InvocationCounter::count_shift;
|
||||
if (ProfileInterpreter) {
|
||||
// Are we profiling?
|
||||
__ movptr(rbx, Address(rcx, in_bytes(methodOopDesc::method_data_offset())));
|
||||
__ testptr(rbx, rbx);
|
||||
__ jccb(Assembler::zero, no_mdo);
|
||||
// Increment the MDO backedge counter
|
||||
const Address mdo_backedge_counter(rbx, in_bytes(methodDataOopDesc::backedge_counter_offset()) +
|
||||
in_bytes(InvocationCounter::counter_offset()));
|
||||
__ increment_mask_and_jump(mdo_backedge_counter, increment, mask,
|
||||
rax, false, Assembler::zero, &backedge_counter_overflow);
|
||||
__ jmp(dispatch);
|
||||
}
|
||||
__ bind(no_mdo);
|
||||
// Increment backedge counter in methodOop
|
||||
__ increment_mask_and_jump(Address(rcx, be_offset), increment, mask,
|
||||
rax, false, Assembler::zero, &backedge_counter_overflow);
|
||||
} else {
|
||||
if (UseOnStackReplacement) {
|
||||
// check for overflow against eax, which is the sum of the
|
||||
// counters
|
||||
__ cmp32(rax,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterBackwardBranchLimit));
|
||||
__ jcc(Assembler::aboveEqual, backedge_counter_overflow);
|
||||
// increment counter
|
||||
__ movl(rax, Address(rcx, be_offset)); // load backedge counter
|
||||
__ incrementl(rax, InvocationCounter::count_increment); // increment counter
|
||||
__ movl(Address(rcx, be_offset), rax); // store counter
|
||||
|
||||
__ movl(rax, Address(rcx, inv_offset)); // load invocation counter
|
||||
__ andl(rax, InvocationCounter::count_mask_value); // and the status bits
|
||||
__ addl(rax, Address(rcx, be_offset)); // add both counters
|
||||
|
||||
if (ProfileInterpreter) {
|
||||
// Test to see if we should create a method data oop
|
||||
__ cmp32(rax,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterProfileLimit));
|
||||
__ jcc(Assembler::less, dispatch);
|
||||
|
||||
// if no method data exists, go to profile method
|
||||
__ test_method_data_pointer(rax, profile_method);
|
||||
|
||||
if (UseOnStackReplacement) {
|
||||
// check for overflow against ebx which is the MDO taken count
|
||||
__ cmp32(rbx,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterBackwardBranchLimit));
|
||||
__ jcc(Assembler::below, dispatch);
|
||||
|
||||
// When ProfileInterpreter is on, the backedge_count comes
|
||||
// from the methodDataOop, which value does not get reset on
|
||||
// the call to frequency_counter_overflow(). To avoid
|
||||
// excessive calls to the overflow routine while the method is
|
||||
// being compiled, add a second test to make sure the overflow
|
||||
// function is called only once every overflow_frequency.
|
||||
const int overflow_frequency = 1024;
|
||||
__ andl(rbx, overflow_frequency - 1);
|
||||
__ jcc(Assembler::zero, backedge_counter_overflow);
|
||||
|
||||
}
|
||||
} else {
|
||||
if (UseOnStackReplacement) {
|
||||
// check for overflow against eax, which is the sum of the
|
||||
// counters
|
||||
__ cmp32(rax,
|
||||
ExternalAddress((address) &InvocationCounter::InterpreterBackwardBranchLimit));
|
||||
__ jcc(Assembler::aboveEqual, backedge_counter_overflow);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
__ bind(dispatch);
|
||||
@ -2912,7 +2932,8 @@ void TemplateTable::prepare_invoke(Register method, Register index, int byte_no)
|
||||
void TemplateTable::invokevirtual_helper(Register index,
|
||||
Register recv,
|
||||
Register flags) {
|
||||
// Uses temporary registers rax, rdx assert_different_registers(index, recv, rax, rdx);
|
||||
// Uses temporary registers rax, rdx
|
||||
assert_different_registers(index, recv, rax, rdx);
|
||||
|
||||
// Test for an invoke of a final method
|
||||
Label notFinal;
|
||||
|
@ -482,6 +482,15 @@ void VM_Version::get_processor_features() {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef COMPILER2
|
||||
if (UseFPUForSpilling) {
|
||||
if (UseSSE < 2) {
|
||||
// Only supported with SSE2+
|
||||
FLAG_SET_DEFAULT(UseFPUForSpilling, false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
assert(0 <= ReadPrefetchInstr && ReadPrefetchInstr <= 3, "invalid value");
|
||||
assert(0 <= AllocatePrefetchInstr && AllocatePrefetchInstr <= 3, "invalid value");
|
||||
|
||||
@ -520,6 +529,11 @@ void VM_Version::get_processor_features() {
|
||||
if( supports_sse4_2() && supports_ht() ) { // Nehalem based cpus
|
||||
AllocatePrefetchDistance = 192;
|
||||
AllocatePrefetchLines = 4;
|
||||
#ifdef COMPILER2
|
||||
if (AggressiveOpts && FLAG_IS_DEFAULT(UseFPUForSpilling)) {
|
||||
FLAG_SET_DEFAULT(UseFPUForSpilling, true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
assert(AllocatePrefetchDistance % AllocatePrefetchStepSize == 0, "invalid value");
|
||||
@ -581,8 +595,7 @@ void VM_Version::initialize() {
|
||||
if (stub_blob == NULL) {
|
||||
vm_exit_during_initialization("Unable to allocate getPsrInfo_stub");
|
||||
}
|
||||
CodeBuffer c(stub_blob->instructions_begin(),
|
||||
stub_blob->instructions_size());
|
||||
CodeBuffer c(stub_blob);
|
||||
VM_Version_StubGenerator g(&c);
|
||||
getPsrInfo_stub = CAST_TO_FN_PTR(getPsrInfo_stub_t,
|
||||
g.generate_getPsrInfo());
|
||||
|
@ -296,14 +296,14 @@ protected:
|
||||
result |= CPU_CX8;
|
||||
if (_cpuid_info.std_cpuid1_edx.bits.cmov != 0)
|
||||
result |= CPU_CMOV;
|
||||
if (_cpuid_info.std_cpuid1_edx.bits.fxsr != 0 || is_amd() &&
|
||||
_cpuid_info.ext_cpuid1_edx.bits.fxsr != 0)
|
||||
if (_cpuid_info.std_cpuid1_edx.bits.fxsr != 0 || (is_amd() &&
|
||||
_cpuid_info.ext_cpuid1_edx.bits.fxsr != 0))
|
||||
result |= CPU_FXSR;
|
||||
// HT flag is set for multi-core processors also.
|
||||
if (threads_per_core() > 1)
|
||||
result |= CPU_HT;
|
||||
if (_cpuid_info.std_cpuid1_edx.bits.mmx != 0 || is_amd() &&
|
||||
_cpuid_info.ext_cpuid1_edx.bits.mmx != 0)
|
||||
if (_cpuid_info.std_cpuid1_edx.bits.mmx != 0 || (is_amd() &&
|
||||
_cpuid_info.ext_cpuid1_edx.bits.mmx != 0))
|
||||
result |= CPU_MMX;
|
||||
if (_cpuid_info.std_cpuid1_edx.bits.sse != 0)
|
||||
result |= CPU_SSE;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2010, 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
|
||||
@ -209,7 +209,7 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
|
||||
(UseCompressedOops ? 16 : 0); // 1 leaq can be 3 bytes + 1 long
|
||||
} else {
|
||||
// Itable stub size
|
||||
return (DebugVtables ? 512 : 72) + (CountCompiledCalls ? 13 : 0) +
|
||||
return (DebugVtables ? 512 : 74) + (CountCompiledCalls ? 13 : 0) +
|
||||
(UseCompressedOops ? 32 : 0); // 2 leaqs
|
||||
}
|
||||
// In order to tune these parameters, run the JVM with VM options
|
||||
|
@ -350,54 +350,46 @@ void MachBreakpointNode::format( PhaseRegAlloc *, outputStream* st ) const {
|
||||
// EMIT_RM()
|
||||
void emit_rm(CodeBuffer &cbuf, int f1, int f2, int f3) {
|
||||
unsigned char c = (unsigned char)((f1 << 6) | (f2 << 3) | f3);
|
||||
*(cbuf.code_end()) = c;
|
||||
cbuf.set_code_end(cbuf.code_end() + 1);
|
||||
cbuf.insts()->emit_int8(c);
|
||||
}
|
||||
|
||||
// EMIT_CC()
|
||||
void emit_cc(CodeBuffer &cbuf, int f1, int f2) {
|
||||
unsigned char c = (unsigned char)( f1 | f2 );
|
||||
*(cbuf.code_end()) = c;
|
||||
cbuf.set_code_end(cbuf.code_end() + 1);
|
||||
cbuf.insts()->emit_int8(c);
|
||||
}
|
||||
|
||||
// EMIT_OPCODE()
|
||||
void emit_opcode(CodeBuffer &cbuf, int code) {
|
||||
*(cbuf.code_end()) = (unsigned char)code;
|
||||
cbuf.set_code_end(cbuf.code_end() + 1);
|
||||
cbuf.insts()->emit_int8((unsigned char) code);
|
||||
}
|
||||
|
||||
// EMIT_OPCODE() w/ relocation information
|
||||
void emit_opcode(CodeBuffer &cbuf, int code, relocInfo::relocType reloc, int offset = 0) {
|
||||
cbuf.relocate(cbuf.inst_mark() + offset, reloc);
|
||||
cbuf.relocate(cbuf.insts_mark() + offset, reloc);
|
||||
emit_opcode(cbuf, code);
|
||||
}
|
||||
|
||||
// EMIT_D8()
|
||||
void emit_d8(CodeBuffer &cbuf, int d8) {
|
||||
*(cbuf.code_end()) = (unsigned char)d8;
|
||||
cbuf.set_code_end(cbuf.code_end() + 1);
|
||||
cbuf.insts()->emit_int8((unsigned char) d8);
|
||||
}
|
||||
|
||||
// EMIT_D16()
|
||||
void emit_d16(CodeBuffer &cbuf, int d16) {
|
||||
*((short *)(cbuf.code_end())) = d16;
|
||||
cbuf.set_code_end(cbuf.code_end() + 2);
|
||||
cbuf.insts()->emit_int16(d16);
|
||||
}
|
||||
|
||||
// EMIT_D32()
|
||||
void emit_d32(CodeBuffer &cbuf, int d32) {
|
||||
*((int *)(cbuf.code_end())) = d32;
|
||||
cbuf.set_code_end(cbuf.code_end() + 4);
|
||||
cbuf.insts()->emit_int32(d32);
|
||||
}
|
||||
|
||||
// emit 32 bit value and construct relocation entry from relocInfo::relocType
|
||||
void emit_d32_reloc(CodeBuffer &cbuf, int d32, relocInfo::relocType reloc,
|
||||
int format) {
|
||||
cbuf.relocate(cbuf.inst_mark(), reloc, format);
|
||||
|
||||
*((int *)(cbuf.code_end())) = d32;
|
||||
cbuf.set_code_end(cbuf.code_end() + 4);
|
||||
cbuf.relocate(cbuf.insts_mark(), reloc, format);
|
||||
cbuf.insts()->emit_int32(d32);
|
||||
}
|
||||
|
||||
// emit 32 bit value and construct relocation entry from RelocationHolder
|
||||
@ -408,10 +400,8 @@ void emit_d32_reloc(CodeBuffer &cbuf, int d32, RelocationHolder const& rspec,
|
||||
assert(oop(d32)->is_oop() && (ScavengeRootsInCode || !oop(d32)->is_scavengable()), "cannot embed scavengable oops in code");
|
||||
}
|
||||
#endif
|
||||
cbuf.relocate(cbuf.inst_mark(), rspec, format);
|
||||
|
||||
*((int *)(cbuf.code_end())) = d32;
|
||||
cbuf.set_code_end(cbuf.code_end() + 4);
|
||||
cbuf.relocate(cbuf.insts_mark(), rspec, format);
|
||||
cbuf.insts()->emit_int32(d32);
|
||||
}
|
||||
|
||||
// Access stack slot for load or store
|
||||
@ -613,7 +603,7 @@ void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
|
||||
emit_rm(cbuf, 0x3, 0x05, ESP_enc);
|
||||
emit_d32(cbuf, framesize);
|
||||
}
|
||||
C->set_frame_complete(cbuf.code_end() - cbuf.code_begin());
|
||||
C->set_frame_complete(cbuf.insts_size());
|
||||
|
||||
#ifdef ASSERT
|
||||
if (VerifyStackAtCalls) {
|
||||
@ -695,7 +685,7 @@ void MachEpilogNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
|
||||
emit_opcode(cbuf, 0x58 | EBP_enc);
|
||||
|
||||
if( do_polling() && C->is_method_compilation() ) {
|
||||
cbuf.relocate(cbuf.code_end(), relocInfo::poll_return_type, 0);
|
||||
cbuf.relocate(cbuf.insts_end(), relocInfo::poll_return_type, 0);
|
||||
emit_opcode(cbuf,0x85);
|
||||
emit_rm(cbuf, 0x0, EAX_enc, 0x5); // EAX
|
||||
emit_d32(cbuf, (intptr_t)os::get_polling_page());
|
||||
@ -852,6 +842,39 @@ static int impl_movx_helper( CodeBuffer *cbuf, bool do_size, int src_lo, int dst
|
||||
}
|
||||
}
|
||||
|
||||
static int impl_movgpr2x_helper( CodeBuffer *cbuf, bool do_size, int src_lo, int dst_lo,
|
||||
int src_hi, int dst_hi, int size, outputStream* st ) {
|
||||
// 32-bit
|
||||
if (cbuf) {
|
||||
emit_opcode(*cbuf, 0x66);
|
||||
emit_opcode(*cbuf, 0x0F);
|
||||
emit_opcode(*cbuf, 0x6E);
|
||||
emit_rm(*cbuf, 0x3, Matcher::_regEncode[dst_lo] & 7, Matcher::_regEncode[src_lo] & 7);
|
||||
#ifndef PRODUCT
|
||||
} else if (!do_size) {
|
||||
st->print("movdl %s, %s\t# spill", Matcher::regName[dst_lo], Matcher::regName[src_lo]);
|
||||
#endif
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
||||
static int impl_movx2gpr_helper( CodeBuffer *cbuf, bool do_size, int src_lo, int dst_lo,
|
||||
int src_hi, int dst_hi, int size, outputStream* st ) {
|
||||
// 32-bit
|
||||
if (cbuf) {
|
||||
emit_opcode(*cbuf, 0x66);
|
||||
emit_opcode(*cbuf, 0x0F);
|
||||
emit_opcode(*cbuf, 0x7E);
|
||||
emit_rm(*cbuf, 0x3, Matcher::_regEncode[src_lo] & 7, Matcher::_regEncode[dst_lo] & 7);
|
||||
#ifndef PRODUCT
|
||||
} else if (!do_size) {
|
||||
st->print("movdl %s, %s\t# spill", Matcher::regName[dst_lo], Matcher::regName[src_lo]);
|
||||
#endif
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
|
||||
static int impl_mov_helper( CodeBuffer *cbuf, bool do_size, int src, int dst, int size, outputStream* st ) {
|
||||
if( cbuf ) {
|
||||
emit_opcode(*cbuf, 0x8B );
|
||||
@ -947,6 +970,12 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
|
||||
if( dst_first_rc == rc_int && src_first_rc == rc_stack )
|
||||
size = impl_helper(cbuf,do_size,true ,ra_->reg2offset(src_first),dst_first,0x8B,"MOV ",size, st);
|
||||
|
||||
// Check for integer reg-xmm reg copy
|
||||
if( src_first_rc == rc_int && dst_first_rc == rc_xmm ) {
|
||||
assert( (src_second_rc == rc_bad && dst_second_rc == rc_bad),
|
||||
"no 64 bit integer-float reg moves" );
|
||||
return impl_movgpr2x_helper(cbuf,do_size,src_first,dst_first,src_second, dst_second, size, st);
|
||||
}
|
||||
// --------------------------------------
|
||||
// Check for float reg-reg copy
|
||||
if( src_first_rc == rc_float && dst_first_rc == rc_float ) {
|
||||
@ -1018,6 +1047,13 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
|
||||
return impl_movx_helper(cbuf,do_size,src_first,dst_first,src_second, dst_second, size, st);
|
||||
}
|
||||
|
||||
// Check for xmm reg-integer reg copy
|
||||
if( src_first_rc == rc_xmm && dst_first_rc == rc_int ) {
|
||||
assert( (src_second_rc == rc_bad && dst_second_rc == rc_bad),
|
||||
"no 64 bit float-integer reg moves" );
|
||||
return impl_movx2gpr_helper(cbuf,do_size,src_first,dst_first,src_second, dst_second, size, st);
|
||||
}
|
||||
|
||||
// Check for xmm store
|
||||
if( src_first_rc == rc_xmm && dst_first_rc == rc_stack ) {
|
||||
return impl_x_helper(cbuf,do_size,false,ra_->reg2offset(dst_first),src_first, src_second, size, st);
|
||||
@ -1165,9 +1201,9 @@ void emit_java_to_interp(CodeBuffer &cbuf ) {
|
||||
// mov rbx,0
|
||||
// jmp -1
|
||||
|
||||
address mark = cbuf.inst_mark(); // get mark within main instrs section
|
||||
address mark = cbuf.insts_mark(); // get mark within main instrs section
|
||||
|
||||
// Note that the code buffer's inst_mark is always relative to insts.
|
||||
// Note that the code buffer's insts_mark is always relative to insts.
|
||||
// That's why we must use the macroassembler to generate a stub.
|
||||
MacroAssembler _masm(&cbuf);
|
||||
|
||||
@ -1182,7 +1218,7 @@ void emit_java_to_interp(CodeBuffer &cbuf ) {
|
||||
__ jump(RuntimeAddress(__ pc()));
|
||||
|
||||
__ end_a_stub();
|
||||
// Update current stubs pointer and restore code_end.
|
||||
// Update current stubs pointer and restore insts_end.
|
||||
}
|
||||
// size of call stub, compiled java to interpretor
|
||||
uint size_java_to_interp() {
|
||||
@ -1208,7 +1244,7 @@ void MachUEPNode::format( PhaseRegAlloc *ra_, outputStream* st ) const {
|
||||
void MachUEPNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
|
||||
MacroAssembler masm(&cbuf);
|
||||
#ifdef ASSERT
|
||||
uint code_size = cbuf.code_size();
|
||||
uint insts_size = cbuf.insts_size();
|
||||
#endif
|
||||
masm.cmpptr(rax, Address(rcx, oopDesc::klass_offset_in_bytes()));
|
||||
masm.jump_cc(Assembler::notEqual,
|
||||
@ -1220,7 +1256,7 @@ void MachUEPNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
|
||||
nops_cnt += 1;
|
||||
masm.nop(nops_cnt);
|
||||
|
||||
assert(cbuf.code_size() - code_size == size(ra_), "checking code size of inline cache node");
|
||||
assert(cbuf.insts_size() - insts_size == size(ra_), "checking code size of inline cache node");
|
||||
}
|
||||
|
||||
uint MachUEPNode::size(PhaseRegAlloc *ra_) const {
|
||||
@ -1242,14 +1278,14 @@ uint size_exception_handler() {
|
||||
// and call a VM stub routine.
|
||||
int emit_exception_handler(CodeBuffer& cbuf) {
|
||||
|
||||
// Note that the code buffer's inst_mark is always relative to insts.
|
||||
// Note that the code buffer's insts_mark is always relative to insts.
|
||||
// That's why we must use the macroassembler to generate a handler.
|
||||
MacroAssembler _masm(&cbuf);
|
||||
address base =
|
||||
__ start_a_stub(size_exception_handler());
|
||||
if (base == NULL) return 0; // CodeBuffer::expand failed
|
||||
int offset = __ offset();
|
||||
__ jump(RuntimeAddress(OptoRuntime::exception_blob()->instructions_begin()));
|
||||
__ jump(RuntimeAddress(OptoRuntime::exception_blob()->entry_point()));
|
||||
assert(__ offset() - offset <= (int) size_exception_handler(), "overflow");
|
||||
__ end_a_stub();
|
||||
return offset;
|
||||
@ -1267,7 +1303,7 @@ uint size_deopt_handler() {
|
||||
// Emit deopt handler code.
|
||||
int emit_deopt_handler(CodeBuffer& cbuf) {
|
||||
|
||||
// Note that the code buffer's inst_mark is always relative to insts.
|
||||
// Note that the code buffer's insts_mark is always relative to insts.
|
||||
// That's why we must use the macroassembler to generate a handler.
|
||||
MacroAssembler _masm(&cbuf);
|
||||
address base =
|
||||
@ -1682,12 +1718,12 @@ encode %{
|
||||
|
||||
enc_class Lbl (label labl) %{ // JMP, CALL
|
||||
Label *l = $labl$$label;
|
||||
emit_d32(cbuf, l ? (l->loc_pos() - (cbuf.code_size()+4)) : 0);
|
||||
emit_d32(cbuf, l ? (l->loc_pos() - (cbuf.insts_size()+4)) : 0);
|
||||
%}
|
||||
|
||||
enc_class LblShort (label labl) %{ // JMP, CALL
|
||||
Label *l = $labl$$label;
|
||||
int disp = l ? (l->loc_pos() - (cbuf.code_size()+1)) : 0;
|
||||
int disp = l ? (l->loc_pos() - (cbuf.insts_size()+1)) : 0;
|
||||
assert(-128 <= disp && disp <= 127, "Displacement too large for short jmp");
|
||||
emit_d8(cbuf, disp);
|
||||
%}
|
||||
@ -1718,13 +1754,13 @@ encode %{
|
||||
Label *l = $labl$$label;
|
||||
$$$emit8$primary;
|
||||
emit_cc(cbuf, $secondary, $cop$$cmpcode);
|
||||
emit_d32(cbuf, l ? (l->loc_pos() - (cbuf.code_size()+4)) : 0);
|
||||
emit_d32(cbuf, l ? (l->loc_pos() - (cbuf.insts_size()+4)) : 0);
|
||||
%}
|
||||
|
||||
enc_class JccShort (cmpOp cop, label labl) %{ // JCC
|
||||
Label *l = $labl$$label;
|
||||
emit_cc(cbuf, $primary, $cop$$cmpcode);
|
||||
int disp = l ? (l->loc_pos() - (cbuf.code_size()+1)) : 0;
|
||||
int disp = l ? (l->loc_pos() - (cbuf.insts_size()+1)) : 0;
|
||||
assert(-128 <= disp && disp <= 127, "Displacement too large for short jmp");
|
||||
emit_d8(cbuf, disp);
|
||||
%}
|
||||
@ -1792,10 +1828,10 @@ encode %{
|
||||
|
||||
enc_class Java_To_Runtime (method meth) %{ // CALL Java_To_Runtime, Java_To_Runtime_Leaf
|
||||
// This is the instruction starting address for relocation info.
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
$$$emit8$primary;
|
||||
// CALL directly to the runtime
|
||||
emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.code_end()) - 4),
|
||||
emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4),
|
||||
runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
|
||||
if (UseSSE >= 2) {
|
||||
@ -1825,12 +1861,12 @@ encode %{
|
||||
|
||||
enc_class pre_call_FPU %{
|
||||
// If method sets FPU control word restore it here
|
||||
debug_only(int off0 = cbuf.code_size());
|
||||
debug_only(int off0 = cbuf.insts_size());
|
||||
if( Compile::current()->in_24_bit_fp_mode() ) {
|
||||
MacroAssembler masm(&cbuf);
|
||||
masm.fldcw(ExternalAddress(StubRoutines::addr_fpu_cntrl_wrd_std()));
|
||||
}
|
||||
debug_only(int off1 = cbuf.code_size());
|
||||
debug_only(int off1 = cbuf.insts_size());
|
||||
assert(off1 - off0 == pre_call_FPU_size(), "correct size prediction");
|
||||
%}
|
||||
|
||||
@ -1843,12 +1879,12 @@ encode %{
|
||||
%}
|
||||
|
||||
enc_class preserve_SP %{
|
||||
debug_only(int off0 = cbuf.code_size());
|
||||
debug_only(int off0 = cbuf.insts_size());
|
||||
MacroAssembler _masm(&cbuf);
|
||||
// RBP is preserved across all calls, even compiled calls.
|
||||
// Use it to preserve RSP in places where the callee might change the SP.
|
||||
__ movptr(rbp_mh_SP_save, rsp);
|
||||
debug_only(int off1 = cbuf.code_size());
|
||||
debug_only(int off1 = cbuf.insts_size());
|
||||
assert(off1 - off0 == preserve_SP_size(), "correct size prediction");
|
||||
%}
|
||||
|
||||
@ -1860,16 +1896,16 @@ encode %{
|
||||
enc_class Java_Static_Call (method meth) %{ // JAVA STATIC CALL
|
||||
// CALL to fixup routine. Fixup routine uses ScopeDesc info to determine
|
||||
// who we intended to call.
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
$$$emit8$primary;
|
||||
if ( !_method ) {
|
||||
emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.code_end()) - 4),
|
||||
emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4),
|
||||
runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
} else if(_optimized_virtual) {
|
||||
emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.code_end()) - 4),
|
||||
emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4),
|
||||
opt_virtual_call_Relocation::spec(), RELOC_IMM32 );
|
||||
} else {
|
||||
emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.code_end()) - 4),
|
||||
emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4),
|
||||
static_call_Relocation::spec(), RELOC_IMM32 );
|
||||
}
|
||||
if( _method ) { // Emit stub for static call
|
||||
@ -1881,15 +1917,15 @@ encode %{
|
||||
// !!!!!
|
||||
// Generate "Mov EAX,0x00", placeholder instruction to load oop-info
|
||||
// emit_call_dynamic_prologue( cbuf );
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
emit_opcode(cbuf, 0xB8 + EAX_enc); // mov EAX,-1
|
||||
emit_d32_reloc(cbuf, (int)Universe::non_oop_word(), oop_Relocation::spec_for_immediate(), RELOC_IMM32);
|
||||
address virtual_call_oop_addr = cbuf.inst_mark();
|
||||
address virtual_call_oop_addr = cbuf.insts_mark();
|
||||
// CALL to fixup routine. Fixup routine uses ScopeDesc info to determine
|
||||
// who we intended to call.
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
$$$emit8$primary;
|
||||
emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.code_end()) - 4),
|
||||
emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4),
|
||||
virtual_call_Relocation::spec(virtual_call_oop_addr), RELOC_IMM32 );
|
||||
%}
|
||||
|
||||
@ -1898,7 +1934,7 @@ encode %{
|
||||
assert( -128 <= disp && disp <= 127, "compiled_code_offset isn't small");
|
||||
|
||||
// CALL *[EAX+in_bytes(methodOopDesc::from_compiled_code_entry_point_offset())]
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
$$$emit8$primary;
|
||||
emit_rm(cbuf, 0x01, $secondary, EAX_enc ); // R/M byte
|
||||
emit_d8(cbuf, disp); // Displacement
|
||||
@ -1930,9 +1966,9 @@ encode %{
|
||||
// emit_rm(cbuf, 0x3, EBP_enc, EBP_enc);
|
||||
//
|
||||
// // CALL to interpreter.
|
||||
// cbuf.set_inst_mark();
|
||||
// cbuf.set_insts_mark();
|
||||
// $$$emit8$primary;
|
||||
// emit_d32_reloc(cbuf, ($labl$$label - (int)(cbuf.code_end()) - 4),
|
||||
// emit_d32_reloc(cbuf, ($labl$$label - (int)(cbuf.insts_end()) - 4),
|
||||
// runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
// %}
|
||||
|
||||
@ -2041,7 +2077,7 @@ encode %{
|
||||
%}
|
||||
|
||||
enc_class Opc_MemImm_F(immF src) %{
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
$$$emit8$primary;
|
||||
emit_rm(cbuf, 0x0, $secondary, 0x5);
|
||||
emit_float_constant(cbuf, $src$$constant);
|
||||
@ -2234,7 +2270,7 @@ encode %{
|
||||
%}
|
||||
|
||||
enc_class set_instruction_start( ) %{
|
||||
cbuf.set_inst_mark(); // Mark start of opcode for reloc info in mem operand
|
||||
cbuf.set_insts_mark(); // Mark start of opcode for reloc info in mem operand
|
||||
%}
|
||||
|
||||
enc_class RegMem (eRegI ereg, memory mem) %{ // emit_reg_mem
|
||||
@ -2383,7 +2419,7 @@ encode %{
|
||||
emit_opcode( cbuf, 0xD9 ); // FLD (i.e., push it)
|
||||
emit_d8( cbuf, 0xC0-1+$src$$reg );
|
||||
}
|
||||
cbuf.set_inst_mark(); // Mark start of opcode for reloc info in mem operand
|
||||
cbuf.set_insts_mark(); // Mark start of opcode for reloc info in mem operand
|
||||
emit_opcode(cbuf,$primary);
|
||||
encode_RegMem(cbuf, reg_encoding, base, index, scale, displace, disp_is_oop);
|
||||
%}
|
||||
@ -2428,7 +2464,7 @@ encode %{
|
||||
emit_opcode(cbuf,0x1B);
|
||||
emit_rm(cbuf, 0x3, tmpReg, tmpReg);
|
||||
// AND $tmp,$y
|
||||
cbuf.set_inst_mark(); // Mark start of opcode for reloc info in mem operand
|
||||
cbuf.set_insts_mark(); // Mark start of opcode for reloc info in mem operand
|
||||
emit_opcode(cbuf,0x23);
|
||||
int reg_encoding = tmpReg;
|
||||
int base = $mem$$base;
|
||||
@ -3111,9 +3147,9 @@ encode %{
|
||||
// PUSH src2.lo
|
||||
emit_opcode(cbuf, 0x50+$src2$$reg );
|
||||
// CALL directly to the runtime
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
emit_opcode(cbuf,0xE8); // Call into runtime
|
||||
emit_d32_reloc(cbuf, (CAST_FROM_FN_PTR(address, SharedRuntime::ldiv) - cbuf.code_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
emit_d32_reloc(cbuf, (CAST_FROM_FN_PTR(address, SharedRuntime::ldiv) - cbuf.insts_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
// Restore stack
|
||||
emit_opcode(cbuf, 0x83); // add SP, #framesize
|
||||
emit_rm(cbuf, 0x3, 0x00, ESP_enc);
|
||||
@ -3130,9 +3166,9 @@ encode %{
|
||||
// PUSH src2.lo
|
||||
emit_opcode(cbuf, 0x50+$src2$$reg );
|
||||
// CALL directly to the runtime
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
emit_opcode(cbuf,0xE8); // Call into runtime
|
||||
emit_d32_reloc(cbuf, (CAST_FROM_FN_PTR(address, SharedRuntime::lrem ) - cbuf.code_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
emit_d32_reloc(cbuf, (CAST_FROM_FN_PTR(address, SharedRuntime::lrem ) - cbuf.insts_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
// Restore stack
|
||||
emit_opcode(cbuf, 0x83); // add SP, #framesize
|
||||
emit_rm(cbuf, 0x3, 0x00, ESP_enc);
|
||||
@ -3778,9 +3814,9 @@ encode %{
|
||||
%}
|
||||
|
||||
enc_class enc_rethrow() %{
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
emit_opcode(cbuf, 0xE9); // jmp entry
|
||||
emit_d32_reloc(cbuf, (int)OptoRuntime::rethrow_stub() - ((int)cbuf.code_end())-4,
|
||||
emit_d32_reloc(cbuf, (int)OptoRuntime::rethrow_stub() - ((int)cbuf.insts_end())-4,
|
||||
runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
%}
|
||||
|
||||
@ -3827,9 +3863,9 @@ encode %{
|
||||
emit_opcode(cbuf,0xD9 ); // FLD ST(i)
|
||||
emit_d8 (cbuf,0xC0-1+$src$$reg );
|
||||
// CALL directly to the runtime
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
emit_opcode(cbuf,0xE8); // Call into runtime
|
||||
emit_d32_reloc(cbuf, (StubRoutines::d2i_wrapper() - cbuf.code_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
emit_d32_reloc(cbuf, (StubRoutines::d2i_wrapper() - cbuf.insts_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
// Carry on here...
|
||||
%}
|
||||
|
||||
@ -3869,9 +3905,9 @@ encode %{
|
||||
emit_opcode(cbuf,0xD9 ); // FLD ST(i)
|
||||
emit_d8 (cbuf,0xC0-1+$src$$reg );
|
||||
// CALL directly to the runtime
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
emit_opcode(cbuf,0xE8); // Call into runtime
|
||||
emit_d32_reloc(cbuf, (StubRoutines::d2l_wrapper() - cbuf.code_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
emit_d32_reloc(cbuf, (StubRoutines::d2l_wrapper() - cbuf.insts_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
// Carry on here...
|
||||
%}
|
||||
|
||||
@ -3942,9 +3978,9 @@ encode %{
|
||||
emit_d8(cbuf,0x04);
|
||||
|
||||
// CALL directly to the runtime
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
emit_opcode(cbuf,0xE8); // Call into runtime
|
||||
emit_d32_reloc(cbuf, (StubRoutines::d2l_wrapper() - cbuf.code_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
emit_d32_reloc(cbuf, (StubRoutines::d2l_wrapper() - cbuf.insts_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
// Carry on here...
|
||||
%}
|
||||
|
||||
@ -4016,9 +4052,9 @@ encode %{
|
||||
emit_d8(cbuf,0x08);
|
||||
|
||||
// CALL directly to the runtime
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
emit_opcode(cbuf,0xE8); // Call into runtime
|
||||
emit_d32_reloc(cbuf, (StubRoutines::d2l_wrapper() - cbuf.code_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
emit_d32_reloc(cbuf, (StubRoutines::d2l_wrapper() - cbuf.insts_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
// Carry on here...
|
||||
%}
|
||||
|
||||
@ -4076,9 +4112,9 @@ encode %{
|
||||
emit_d8(cbuf, $primary ? 0x8 : 0x4);
|
||||
|
||||
// CALL directly to the runtime
|
||||
cbuf.set_inst_mark();
|
||||
cbuf.set_insts_mark();
|
||||
emit_opcode(cbuf,0xE8); // Call into runtime
|
||||
emit_d32_reloc(cbuf, (StubRoutines::d2i_wrapper() - cbuf.code_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
emit_d32_reloc(cbuf, (StubRoutines::d2i_wrapper() - cbuf.insts_end()) - 4, runtime_call_Relocation::spec(), RELOC_IMM32 );
|
||||
|
||||
// Carry on here...
|
||||
%}
|
||||
@ -4275,7 +4311,7 @@ encode %{
|
||||
// so the memory operand is used twice in the encoding.
|
||||
enc_class enc_storeL_volatile( memory mem, stackSlotL src ) %{
|
||||
store_to_stackslot( cbuf, 0x0DF, 0x05, $src$$disp );
|
||||
cbuf.set_inst_mark(); // Mark start of FIST in case $mem has an oop
|
||||
cbuf.set_insts_mark(); // Mark start of FIST in case $mem has an oop
|
||||
emit_opcode(cbuf,0xDF);
|
||||
int rm_byte_opcode = 0x07;
|
||||
int base = $mem$$base;
|
||||
@ -4299,7 +4335,7 @@ encode %{
|
||||
bool disp_is_oop = $src->disp_is_oop(); // disp-as-oop when working with static globals
|
||||
encode_RegMem(cbuf, $tmp$$reg, base, index, scale, displace, disp_is_oop);
|
||||
}
|
||||
cbuf.set_inst_mark(); // Mark start of MOVSD in case $mem has an oop
|
||||
cbuf.set_insts_mark(); // Mark start of MOVSD in case $mem has an oop
|
||||
{ // MOVSD $mem,$tmp ! atomic long store
|
||||
emit_opcode(cbuf,0xF2);
|
||||
emit_opcode(cbuf,0x0F);
|
||||
@ -4332,7 +4368,7 @@ encode %{
|
||||
emit_opcode(cbuf,0x62);
|
||||
emit_rm(cbuf, 0x3, $tmp$$reg, $tmp2$$reg);
|
||||
}
|
||||
cbuf.set_inst_mark(); // Mark start of MOVSD in case $mem has an oop
|
||||
cbuf.set_insts_mark(); // Mark start of MOVSD in case $mem has an oop
|
||||
{ // MOVSD $mem,$tmp ! atomic long store
|
||||
emit_opcode(cbuf,0xF2);
|
||||
emit_opcode(cbuf,0x0F);
|
||||
@ -4353,7 +4389,7 @@ encode %{
|
||||
// A better choice might be TESTB [spp + pagesize() - CacheLineSize()],0
|
||||
|
||||
enc_class Safepoint_Poll() %{
|
||||
cbuf.relocate(cbuf.inst_mark(), relocInfo::poll_type, 0);
|
||||
cbuf.relocate(cbuf.insts_mark(), relocInfo::poll_type, 0);
|
||||
emit_opcode(cbuf,0x85);
|
||||
emit_rm (cbuf, 0x0, 0x7, 0x5);
|
||||
emit_d32(cbuf, (intptr_t)os::get_polling_page());
|
||||
@ -12886,7 +12922,7 @@ instruct jmpConUCF2(cmpOpUCF2 cop, eFlagsRegUCF cmp, label labl) %{
|
||||
bool ok = false;
|
||||
if ($cop$$cmpcode == Assembler::notEqual) {
|
||||
// the two jumps 6 bytes apart so the jump distances are too
|
||||
parity_disp = l ? (l->loc_pos() - (cbuf.code_size() + 4)) : 0;
|
||||
parity_disp = l ? (l->loc_pos() - (cbuf.insts_size() + 4)) : 0;
|
||||
} else if ($cop$$cmpcode == Assembler::equal) {
|
||||
parity_disp = 6;
|
||||
ok = true;
|
||||
@ -12896,7 +12932,7 @@ instruct jmpConUCF2(cmpOpUCF2 cop, eFlagsRegUCF cmp, label labl) %{
|
||||
emit_d32(cbuf, parity_disp);
|
||||
$$$emit8$primary;
|
||||
emit_cc(cbuf, $secondary, $cop$$cmpcode);
|
||||
int disp = l ? (l->loc_pos() - (cbuf.code_size() + 4)) : 0;
|
||||
int disp = l ? (l->loc_pos() - (cbuf.insts_size() + 4)) : 0;
|
||||
emit_d32(cbuf, disp);
|
||||
%}
|
||||
ins_pipe(pipe_jcc);
|
||||
@ -13082,7 +13118,7 @@ instruct jmpConUCF2_short(cmpOpUCF2 cop, eFlagsRegUCF cmp, label labl) %{
|
||||
emit_cc(cbuf, $primary, Assembler::parity);
|
||||
int parity_disp = -1;
|
||||
if ($cop$$cmpcode == Assembler::notEqual) {
|
||||
parity_disp = l ? (l->loc_pos() - (cbuf.code_size() + 1)) : 0;
|
||||
parity_disp = l ? (l->loc_pos() - (cbuf.insts_size() + 1)) : 0;
|
||||
} else if ($cop$$cmpcode == Assembler::equal) {
|
||||
parity_disp = 2;
|
||||
} else {
|
||||
@ -13090,7 +13126,7 @@ instruct jmpConUCF2_short(cmpOpUCF2 cop, eFlagsRegUCF cmp, label labl) %{
|
||||
}
|
||||
emit_d8(cbuf, parity_disp);
|
||||
emit_cc(cbuf, $primary, $cop$$cmpcode);
|
||||
int disp = l ? (l->loc_pos() - (cbuf.code_size() + 1)) : 0;
|
||||
int disp = l ? (l->loc_pos() - (cbuf.insts_size() + 1)) : 0;
|
||||
emit_d8(cbuf, disp);
|
||||
assert(-128 <= disp && disp <= 127, "Displacement too large for short jmp");
|
||||
assert(-128 <= parity_disp && parity_disp <= 127, "Displacement too large for short jmp");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user