/hg/release/icedtea7-forest-2.5/hotspot: 21 new changesets
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Tue Jun 3 18:03:47 UTC 2014
changeset 2e44b0df2947 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=2e44b0df2947
author: andrew
date: Thu May 01 22:38:19 2014 +0100
PR1757: register_method usage in sharkCompiler.cpp needs to be adjusted following S7196199
changeset 15d8ca5ed040 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=15d8ca5ed040
author: andrew
date: Fri May 02 20:00:10 2014 +0100
Correct placement of S8041658 fix
changeset 8283b5a20eed in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=8283b5a20eed
author: andrew
date: Fri May 16 16:39:47 2014 +0100
8038392: Generating prelink cache breaks JAVA 'jinfo' utility normal behavior
Summary: See RH1064383 (https://bugzilla.redhat.com/show_bug.cgi?id=1064383)
Contributed-by: Carlos Santos <casantos at redhat.com>
changeset 310346e75b1e in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=310346e75b1e
author: goetz
date: Wed Feb 05 17:40:37 2014 +0100
Fix handling of scalar replaced objects.
Index in SafePointScalarObjectNode was wrong because we
added an edge to a SafePoint without updating the offset
in that node.
changeset 95a97b5ea9dd in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=95a97b5ea9dd
author: goetz
date: Fri Feb 07 14:57:01 2014 +0100
8016491: PPC64 (part 2): Clean up PPC defines.
Summary: Distinguish PPC, PPC64 and PPC32. PPC should guard code needed on any
PPC system. PPC32 and PPC64 should guard code needed in a port for the ppc64 or ppc32 instruction set.
changeset fac28fa93873 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=fac28fa93873
author: goetz
date: Fri Feb 07 15:08:10 2014 +0100
8016586: PPC64 (part 3): basic changes for PPC64
Summary: added #includes needed for ppc64 port. Renamed _MODEL_ppc to_MODEL_ppc_32 and renamed corresponding old _ppc files to _ppc_32.
changeset b5ea1e8f0e0d in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=b5ea1e8f0e0d
author: goetz
date: Fri Feb 07 16:07:53 2014 +0100
8017313: PPC64 (part 6): stack handling improvements
Summary: Precompute limit for stack overflow check
changeset 2235436776a9 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=2235436776a9
author: goetz
date: Fri Feb 07 16:18:07 2014 +0100
016696: PPC64 (part 4): add relocation for trampoline stubs
Summary: A trampoline allows to encode a small branch in the code, even if there is the chance that this branch can not reach all possible code locations. If the relocation finds that a branch is too far for the instruction in the code, it can patch it to jump to the trampoline where is sufficient space for a far branch. Needed on PPC.
changeset 280853a5f930 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=280853a5f930
author: goetz
date: Mon Feb 10 10:34:59 2014 +0100
8019517: PPC64 (part 102): cppInterpreter: implement G1 support
8019518: PPC64 (part 103): cppInterpreter: implement support for compressed Oops
8019519: PPC64 (part 105): C interpreter: implement support for jvmti early return.
8020121: PPC64: fix build in cppInterpreter after 8019519
changeset 269da903cfc1 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=269da903cfc1
author: goetz
date: Mon Feb 10 10:47:51 2014 +0100
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
changeset d50defb551ff in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=d50defb551ff
author: goetz
date: Mon Feb 10 11:52:36 2014 +0100
8017317: PPC64 (part 7): cppInterpreter: implement support for biased locking
8024469: PPC64 (part 202): cppInterpreter: support for OSR.
8029957: PPC64 (part 213): cppInterpreter: memory ordering for object initialization
changeset c29ebae33d5a in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=c29ebae33d5a
author: goetz
date: Tue Jun 03 17:31:12 2014 +0100
8024468: PPC64 (part 201): cppInterpreter: implement bytecode profiling
Summary: Implement profiling for c2 jit compilation.
changeset 0a5c327d8d65 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=0a5c327d8d65
author: goetz
date: Tue Jun 03 17:33:15 2014 +0100
8024344: PPC64 (part 112): C argument in register AND stack slot.
changeset 452bfa35d8c4 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=452bfa35d8c4
author: goetz
date: Mon Feb 17 10:25:36 2014 +0100
8033168: PPC64: gcc 4.8 warning in output_c.cpp
changeset 352109fc1a1d in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=352109fc1a1d
author: goetz
date: Mon Feb 17 14:17:20 2014 +0100
PPC64: Support for ABI_ELFv2.
Contributed-by: asmundak at google.com
changeset 531d6b6209c6 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=531d6b6209c6
author: goetz
date: Fri Mar 21 21:01:24 2014 +0100
8035396: Introduce accessor for tmp_oop in frame.
Summary: Avoid #ifs by introducing the accessor function interpreter_frame_temp_oop_addr().
changeset bf3b3a517a06 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=bf3b3a517a06
author: goetz
date: Fri Mar 28 15:05:47 2014 +0100
8036976: PPC64: implement the template interpreter
changeset 16c78bf94d69 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=16c78bf94d69
author: goetz
date: Fri Mar 28 15:42:18 2014 +0100
New files for template interpreter
Missed from 8036976: PPC64: implement the template interpreter
changeset 781f202c6600 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=781f202c6600
author: goetz
date: Mon Mar 31 12:51:40 2014 +0200
8037915: PPC64/AIX: Several smaller fixes
changeset b1263b242ca6 in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=b1263b242ca6
author: simonis
date: Tue Jun 03 17:36:09 2014 +0100
8036767: PPC64: Support for little endian execution model
Reviewed-by: simonis
changeset 3017276776bf in /hg/release/icedtea7-forest-2.5/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.5/hotspot?cmd=changeset;node=3017276776bf
author: goetz
date: Thu May 08 16:16:21 2014 +0200
8042309: Some bugfixes for the ppc64 port
diffstat:
agent/src/os/linux/ps_proc.c | 52 +-
make/aix/Makefile | 4 +
make/linux/Makefile | 6 +-
make/linux/makefiles/buildtree.make | 9 +-
make/linux/makefiles/defs.make | 12 +
make/linux/makefiles/gcc.make | 8 +-
make/linux/makefiles/ppc64.make | 65 +-
make/linux/platform_ppc | 6 +-
src/cpu/ppc/vm/assembler_ppc.cpp | 15 +-
src/cpu/ppc/vm/assembler_ppc.hpp | 15 +-
src/cpu/ppc/vm/assembler_ppc.inline.hpp | 4 +-
src/cpu/ppc/vm/bytes_ppc.hpp | 126 +
src/cpu/ppc/vm/compile_ppc.cpp | 26 -
src/cpu/ppc/vm/cppInterpreter_ppc.cpp | 21 +-
src/cpu/ppc/vm/frame_ppc.cpp | 30 +-
src/cpu/ppc/vm/frame_ppc.hpp | 132 +-
src/cpu/ppc/vm/frame_ppc.inline.hpp | 75 +-
src/cpu/ppc/vm/interp_masm_ppc_64.cpp | 1773 +++++-
src/cpu/ppc/vm/interp_masm_ppc_64.hpp | 221 +-
src/cpu/ppc/vm/interpreterRT_ppc.cpp | 5 +
src/cpu/ppc/vm/interpreter_ppc.cpp | 64 +-
src/cpu/ppc/vm/interpreter_ppc.hpp | 14 +-
src/cpu/ppc/vm/javaFrameAnchor_ppc.hpp | 6 +-
src/cpu/ppc/vm/jniFastGetField_ppc.cpp | 6 +-
src/cpu/ppc/vm/macroAssembler_ppc.cpp | 114 +-
src/cpu/ppc/vm/macroAssembler_ppc.hpp | 68 +-
src/cpu/ppc/vm/macroAssembler_ppc.inline.hpp | 53 +-
src/cpu/ppc/vm/methodHandles_ppc.cpp | 27 +-
src/cpu/ppc/vm/ppc.ad | 178 +-
src/cpu/ppc/vm/register_ppc.hpp | 32 +-
src/cpu/ppc/vm/runtime_ppc.cpp | 12 +-
src/cpu/ppc/vm/sharedRuntime_ppc.cpp | 143 +-
src/cpu/ppc/vm/stubGenerator_ppc.cpp | 116 +-
src/cpu/ppc/vm/stubRoutines_ppc_64.cpp | 13 +-
src/cpu/ppc/vm/stubRoutines_ppc_64.hpp | 2 +-
src/cpu/ppc/vm/templateInterpreterGenerator_ppc.hpp | 44 +
src/cpu/ppc/vm/templateInterpreter_ppc.cpp | 1854 +++++
src/cpu/ppc/vm/templateInterpreter_ppc.hpp | 41 +
src/cpu/ppc/vm/templateTable_ppc_64.cpp | 4261 +++++++++++++
src/cpu/ppc/vm/templateTable_ppc_64.hpp | 38 +
src/cpu/ppc/vm/vm_version_ppc.cpp | 18 +-
src/cpu/ppc/vm/vm_version_ppc.hpp | 2 +-
src/cpu/ppc/vm/vtableStubs_ppc_64.cpp | 2 +-
src/cpu/sparc/vm/frame_sparc.inline.hpp | 4 +
src/cpu/x86/vm/frame_x86.inline.hpp | 4 +
src/cpu/zero/vm/globals_zero.hpp | 3 +-
src/os/aix/vm/mutex_aix.inline.hpp | 12 +-
src/os/bsd/vm/os_bsd.cpp | 2 +-
src/os/linux/vm/os_linux.cpp | 4 +
src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp | 1 -
src/os_cpu/aix_ppc/vm/threadLS_aix_ppc.cpp | 8 +-
src/os_cpu/aix_ppc/vm/thread_aix_ppc.cpp | 6 +-
src/os_cpu/bsd_zero/vm/os_bsd_zero.hpp | 2 +-
src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp | 2 -
src/os_cpu/linux_ppc/vm/thread_linux_ppc.cpp | 6 +-
src/os_cpu/linux_zero/vm/os_linux_zero.hpp | 2 +-
src/share/vm/adlc/output_c.cpp | 6 +-
src/share/vm/code/relocInfo.cpp | 8 +-
src/share/vm/code/relocInfo.hpp | 8 +-
src/share/vm/interpreter/abstractInterpreter.hpp | 4 +-
src/share/vm/interpreter/bytecodeInterpreter.cpp | 482 +-
src/share/vm/interpreter/bytecodeInterpreterProfiling.hpp | 11 +-
src/share/vm/interpreter/interpreterRuntime.cpp | 44 +-
src/share/vm/interpreter/interpreterRuntime.hpp | 8 +-
src/share/vm/interpreter/invocationCounter.hpp | 14 +-
src/share/vm/interpreter/templateTable.hpp | 14 +-
src/share/vm/oops/methodDataOop.hpp | 2 +-
src/share/vm/opto/generateOptoStub.cpp | 2 +-
src/share/vm/prims/forte.cpp | 10 +-
src/share/vm/runtime/arguments.cpp | 9 +-
src/share/vm/runtime/frame.cpp | 15 +-
src/share/vm/runtime/frame.hpp | 6 +-
src/share/vm/runtime/frame.inline.hpp | 7 +
src/share/vm/runtime/globals.hpp | 4 +-
src/share/vm/runtime/os.cpp | 2 +-
src/share/vm/runtime/stubRoutines.hpp | 4 +-
src/share/vm/runtime/thread.cpp | 3 +
src/share/vm/runtime/thread.hpp | 29 +-
src/share/vm/shark/sharkCompiler.cpp | 3 +-
src/share/vm/utilities/elfFile.cpp | 2 +-
src/share/vm/utilities/macros.hpp | 3 +
81 files changed, 9674 insertions(+), 795 deletions(-)
diffs (truncated from 13595 to 500 lines):
diff -r df3f0e040c01 -r 3017276776bf agent/src/os/linux/ps_proc.c
--- a/agent/src/os/linux/ps_proc.c Thu Apr 24 16:21:06 2014 +0100
+++ b/agent/src/os/linux/ps_proc.c Thu May 08 16:16:21 2014 +0200
@@ -261,7 +261,7 @@
static bool read_lib_info(struct ps_prochandle* ph) {
char fname[32];
- char buf[256];
+ char buf[PATH_MAX];
FILE *fp = NULL;
sprintf(fname, "/proc/%d/maps", ph->pid);
@@ -271,10 +271,52 @@
return false;
}
- while(fgets_no_cr(buf, 256, fp)){
- char * word[6];
- int nwords = split_n_str(buf, 6, word, ' ', '\0');
- if (nwords > 5 && find_lib(ph, word[5]) == false) {
+ while(fgets_no_cr(buf, PATH_MAX, fp)){
+ char * word[7];
+ int nwords = split_n_str(buf, 7, word, ' ', '\0');
+
+ if (nwords < 6) {
+ // not a shared library entry. ignore.
+ continue;
+ }
+
+ if (word[5][0] == '[') {
+ // not a shared library entry. ignore.
+ if (strncmp(word[5],"[stack",6) == 0) {
+ continue;
+ }
+ if (strncmp(word[5],"[heap]",6) == 0) {
+ continue;
+ }
+
+ // SA don't handle VDSO
+ if (strncmp(word[5],"[vdso]",6) == 0) {
+ continue;
+ }
+ if (strncmp(word[5],"[vsyscall]",6) == 0) {
+ continue;
+ }
+ }
+
+ if (nwords > 6) {
+ // prelink altered mapfile when the program is running.
+ // Entries like one below have to be skipped
+ // /lib64/libc-2.15.so (deleted)
+ // SO name in entries like one below have to be stripped.
+ // /lib64/libpthread-2.15.so.#prelink#.EECVts
+ char *s = strstr(word[5],".#prelink#");
+ if (s == NULL) {
+ // No prelink keyword. skip deleted library
+ print_debug("skip shared object %s deleted by prelink\n", word[5]);
+ continue;
+ }
+
+ // Fall through
+ print_debug("rectifing shared object name %s changed by prelink\n", word[5]);
+ *s = 0;
+ }
+
+ if (find_lib(ph, word[5]) == false) {
intptr_t base;
lib_info* lib;
#ifdef _LP64
diff -r df3f0e040c01 -r 3017276776bf make/aix/Makefile
--- a/make/aix/Makefile Thu Apr 24 16:21:06 2014 +0100
+++ b/make/aix/Makefile Thu May 08 16:16:21 2014 +0200
@@ -67,6 +67,10 @@
FORCE_TIERED=1
endif
endif
+# C1 is not ported on ppc64, so we cannot build a tiered VM:
+ifeq ($(ARCH),ppc64))
+ FORCE_TIERED=0
+endif
ifdef LP64
ifeq ("$(filter $(LP64_ARCH),$(BUILDARCH))","")
diff -r df3f0e040c01 -r 3017276776bf make/linux/Makefile
--- a/make/linux/Makefile Thu Apr 24 16:21:06 2014 +0100
+++ b/make/linux/Makefile Thu May 08 16:16:21 2014 +0200
@@ -66,6 +66,10 @@
FORCE_TIERED=1
endif
endif
+# C1 is not ported on ppc64, so we cannot build a tiered VM:
+ifeq ($(ARCH),ppc64)
+ FORCE_TIERED=0
+endif
ifdef LP64
ifeq ("$(filter $(LP64_ARCH),$(BUILDARCH))","")
@@ -208,7 +212,7 @@
TARGETS_SHARK = $(addsuffix shark,$(TARGETS))
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
-BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
+BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) OPENJDK_TARGET_CPU_ENDIAN=$(OPENJDK_TARGET_CPU_ENDIAN)
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
diff -r df3f0e040c01 -r 3017276776bf make/linux/makefiles/buildtree.make
--- a/make/linux/makefiles/buildtree.make Thu Apr 24 16:21:06 2014 +0100
+++ b/make/linux/makefiles/buildtree.make Thu May 08 16:16:21 2014 +0200
@@ -26,7 +26,7 @@
# Usage:
#
# $(MAKE) -f buildtree.make SRCARCH=srcarch BUILDARCH=buildarch LIBARCH=libarch
-# GAMMADIR=dir OS_FAMILY=os VARIANT=variant
+# GAMMADIR=dir OS_FAMILY=os VARIANT=variant OPENJDK_TARGET_CPU_ENDIAN=endianness
#
# The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
# environment or on the command-line:
@@ -40,7 +40,8 @@
# HOTSPOT_RELEASE_VERSION - <major>.<minor>-b<nn> (11.0-b07)
# HOTSPOT_BUILD_VERSION - internal, internal-$(USER_RELEASE_SUFFIX) or empty
# JRE_RELEASE_VERSION - <major>.<minor>.<micro> (1.7.0)
-#
+# OPENJDK_TARGET_CPU_ENDIAN - target endianness: 'big'/'little'. Used to differentiate
+# the architecture flavor for PowerPC64
# Builds the directory trees with makefiles plus some convenience files in
# each directory:
#
@@ -133,7 +134,8 @@
env.sh env.csh jdkpath.sh .dbxrc test_gamma
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
- SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
+ SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT) \
+ OPENJDK_TARGET_CPU_ENDIAN=$(OPENJDK_TARGET_CPU_ENDIAN)
# Define variables to be set in flags.make.
# Default values are set in make/defs.make.
@@ -210,6 +212,7 @@
echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
echo "OPENJDK = $(OPENJDK)"; \
echo "ZERO_BUILD = $(ZERO_BUILD)"; \
+ echo "OPENJDK_TARGET_CPU_ENDIAN = $(OPENJDK_TARGET_CPU_ENDIAN)"; \
echo; \
echo "# Used for platform dispatching"; \
echo "TARGET_DEFINES = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \
diff -r df3f0e040c01 -r 3017276776bf make/linux/makefiles/defs.make
--- a/make/linux/makefiles/defs.make Thu Apr 24 16:21:06 2014 +0100
+++ b/make/linux/makefiles/defs.make Thu May 08 16:16:21 2014 +0200
@@ -133,6 +133,18 @@
PLATFORM = linux-ppc64
VM_PLATFORM = linux_ppc64
HS_ARCH = ppc
+ OPENJDK_TARGET_CPU_ENDIAN = big
+endif
+
+# PPC64LE
+ifeq ($(ARCH), ppc64le)
+ ARCH_DATA_MODEL = 64
+ MAKE_ARGS += LP64=1
+ PLATFORM = linux-ppc64
+ VM_PLATFORM = linux_ppc64
+ HS_ARCH = ppc
+ OPENJDK_TARGET_CPU_ENDIAN = little
+ ARCH := ppc64
endif
# determine if HotSpot is being built in JDK6 or earlier version
diff -r df3f0e040c01 -r 3017276776bf make/linux/makefiles/gcc.make
--- a/make/linux/makefiles/gcc.make Thu Apr 24 16:21:06 2014 +0100
+++ b/make/linux/makefiles/gcc.make Thu May 08 16:16:21 2014 +0200
@@ -171,6 +171,11 @@
OPT_CFLAGS/mulnode.o += -O0
endif
+# 8041658. Problem in GCC 4.9.0 with virtualisation removing return statements.
+ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 9), 1)
+OPT_CFLAGS += -fno-devirtualize
+endif
+
# Flags for generating make dependency flags.
ifneq ("${CC_VER_MAJOR}", "2")
DEPFLAGS = -fpch-deps -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
@@ -265,9 +270,6 @@
OPT_CFLAGS += -gstabs
endif
endif
- ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 9), 1)
- OPT_CFLAGS += -fno-devirtualize
- endif
endif
# If we are building HEADLESS, pass on to VM
diff -r df3f0e040c01 -r 3017276776bf make/linux/makefiles/ppc64.make
--- a/make/linux/makefiles/ppc64.make Thu Apr 24 16:21:06 2014 +0100
+++ b/make/linux/makefiles/ppc64.make Thu May 08 16:16:21 2014 +0200
@@ -23,33 +23,54 @@
#
#
-# produce 64 bits object files.
-CFLAGS += -m64
-
-# make c code know it is on a 64 bit platform.
+# make c code know it is on a 64 bit platform.
CFLAGS += -D_LP64=1
-# fixes `relocation truncated to fit' error for gcc 4.1.
-CFLAGS += -mminimal-toc
+ifeq ($(origin OPENJDK_TARGET_CPU_ENDIAN),undefined)
+ # This can happen during hotspot standalone build. Set endianness from
+ # uname. We assume build and target machines are the same.
+ OPENJDK_TARGET_CPU_ENDIAN:=$(if $(filter ppc64le,$(shell uname -m)),little,big)
+endif
-# finds use ppc64 instructions, but schedule for power5
-CFLAGS += -mcpu=powerpc64 -mtune=power5 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
+ifeq ($(filter $(OPENJDK_TARGET_CPU_ENDIAN),big little),)
+ $(error OPENJDK_TARGET_CPU_ENDIAN value should be 'big' or 'little')
+endif
-# PPC uses safefetch stubs.
-CFLAGS += -DSAFEFETCH_STUBS
+ifeq ($(OPENJDK_TARGET_CPU_ENDIAN),big)
+ # produce 64 bits object files.
+ CFLAGS += -m64
-# let linker produce 64 bit lib.
-LFLAGS_VM += -m64
+ # fixes `relocation truncated to fit' error for gcc 4.1.
+ CFLAGS += -mminimal-toc
-# let linker find external 64 bit libs.
-LFLAGS_VM += -L/lib64
+ # finds use ppc64 instructions, but schedule for power5
+ CFLAGS += -mcpu=powerpc64 -mtune=power5 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
-# specify lib format.
-LFLAGS_VM += -Wl,-melf64ppc
+ # PPC uses safefetch stubs.
+ CFLAGS += -DSAFEFETCH_STUBS
-# also build launcher as 64 bit executable.
-LAUNCHERFLAGS += -m64
-LAUNCHERFLAGS += -D_LP64=1
-AOUT_FLAGS += -m64
-AOUT_FLAGS += -L/lib64
-AOUT_FLAGS += -Wl,-melf64ppc
+ # let linker produce 64 bit lib.
+ LFLAGS_VM += -m64
+
+ # let linker find external 64 bit libs.
+ LFLAGS_VM += -L/lib64
+
+ # specify lib format.
+ LFLAGS_VM += -Wl,-melf64ppc
+
+ # also build launcher as 64 bit executable.
+ LAUNCHERFLAGS += -m64
+ LAUNCHERFLAGS += -D_LP64=1
+ AOUT_FLAGS += -m64
+ AOUT_FLAGS += -L/lib64
+ AOUT_FLAGS += -Wl,-melf64ppc
+else
+ # Little endian machine uses ELFv2 ABI.
+ CFLAGS += -DVM_LITTLE_ENDIAN -DABI_ELFv2
+
+ # PPC uses safefetch stubs. TODO(asmundak): is this needed?
+ CFLAGS += -DSAFEFETCH_STUBS
+
+ # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
+ CFLAGS += -mcpu=power7 -mtune=power8 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
+endif
diff -r df3f0e040c01 -r 3017276776bf make/linux/platform_ppc
--- a/make/linux/platform_ppc Thu Apr 24 16:21:06 2014 +0100
+++ b/make/linux/platform_ppc Thu May 08 16:16:21 2014 +0200
@@ -2,11 +2,11 @@
arch = ppc
-arch_model = ppc
+arch_model = ppc_32
os_arch = linux_ppc
-os_arch_model = linux_ppc
+os_arch_model = linux_ppc_32
lib_arch = ppc
@@ -14,4 +14,4 @@
gnu_dis_arch = ppc
-sysdefs = -DLINUX -D_GNU_SOURCE -DPPC
+sysdefs = -DLINUX -D_GNU_SOURCE -DPPC32
diff -r df3f0e040c01 -r 3017276776bf src/cpu/ppc/vm/assembler_ppc.cpp
--- a/src/cpu/ppc/vm/assembler_ppc.cpp Thu Apr 24 16:21:06 2014 +0100
+++ b/src/cpu/ppc/vm/assembler_ppc.cpp Thu May 08 16:16:21 2014 +0200
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright 2012, 2014 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,7 @@
#include "runtime/os.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
+#include "utilities/macros.hpp"
#ifndef SERIALGC
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
@@ -383,10 +384,10 @@
bool load_xa = (xa != 0) || (xb < 0);
bool return_xd = false;
- if (load_xa) lis(tmp, xa);
- if (xc) lis(d, xc);
+ if (load_xa) { lis(tmp, xa); }
+ if (xc) { lis(d, xc); }
if (load_xa) {
- if (xb) ori(tmp, tmp, xb); // No addi, we support tmp == R0.
+ if (xb) { ori(tmp, tmp, (unsigned short)xb); } // No addi, we support tmp == R0.
} else {
li(tmp, xb); // non-negative
}
@@ -408,18 +409,18 @@
// opt 4: avoid adding 0
if (xa) { // Highest 16-bit needed?
lis(d, xa);
- if (xb) addi(d, d, xb);
+ if (xb) { addi(d, d, xb); }
} else {
li(d, xb);
}
sldi(d, d, 32);
- if (xc) addis(d, d, xc);
+ if (xc) { addis(d, d, xc); }
}
// opt 5: Return offset to be inserted into following instruction.
if (return_simm16_rest) return xd;
- if (xd) addi(d, d, xd);
+ if (xd) { addi(d, d, xd); }
return 0;
}
diff -r df3f0e040c01 -r 3017276776bf src/cpu/ppc/vm/assembler_ppc.hpp
--- a/src/cpu/ppc/vm/assembler_ppc.hpp Thu Apr 24 16:21:06 2014 +0100
+++ b/src/cpu/ppc/vm/assembler_ppc.hpp Thu May 08 16:16:21 2014 +0200
@@ -127,6 +127,7 @@
}
};
+#if !defined(ABI_ELFv2)
// A ppc64 function descriptor.
struct FunctionDescriptor VALUE_OBJ_CLASS_SPEC {
private:
@@ -164,6 +165,7 @@
_env = (address) 0xbad;
}
};
+#endif
class Assembler : public AbstractAssembler {
protected:
@@ -1027,15 +1029,14 @@
}
static void set_imm(int* instr, short s) {
- short* p = ((short *)instr) + 1;
- *p = s;
+ // imm is always in the lower 16 bits of the instruction,
+ // so this is endian-neutral. Same for the get_imm below.
+ uint32_t w = *(uint32_t *)instr;
+ *instr = (int)((w & ~0x0000FFFF) | (s & 0x0000FFFF));
}
static int get_imm(address a, int instruction_number) {
- short imm;
- short *p =((short *)a)+2*instruction_number+1;
- imm = *p;
- return (int)imm;
+ return (short)((int *)a)[instruction_number];
}
static inline int hi16_signed( int x) { return (int)(int16_t)(x >> 16); }
@@ -1072,6 +1073,7 @@
// Emit an address.
inline address emit_addr(const address addr = NULL);
+#if !defined(ABI_ELFv2)
// Emit a function descriptor with the specified entry point, TOC,
// and ENV. If the entry point is NULL, the descriptor will point
// just past the descriptor.
@@ -1079,6 +1081,7 @@
inline address emit_fd(address entry = NULL,
address toc = (address) FunctionDescriptor::friend_toc,
address env = (address) FunctionDescriptor::friend_env);
+#endif
/////////////////////////////////////////////////////////////////////////////////////
// PPC instructions
diff -r df3f0e040c01 -r 3017276776bf src/cpu/ppc/vm/assembler_ppc.inline.hpp
--- a/src/cpu/ppc/vm/assembler_ppc.inline.hpp Thu Apr 24 16:21:06 2014 +0100
+++ b/src/cpu/ppc/vm/assembler_ppc.inline.hpp Thu May 08 16:16:21 2014 +0200
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012, 2013 SAP AG. All rights reserved.
+ * Copyright 2012, 2014 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -64,6 +64,7 @@
return start;
}
+#if !defined(ABI_ELFv2)
// Emit a function descriptor with the specified entry point, TOC, and
// ENV. If the entry point is NULL, the descriptor will point just
// past the descriptor.
@@ -82,6 +83,7 @@
return (address)fd;
}
+#endif
// Issue an illegal instruction. 0 is guaranteed to be an illegal instruction.
inline void Assembler::illtrap() { Assembler::emit_int32(0); }
diff -r df3f0e040c01 -r 3017276776bf src/cpu/ppc/vm/bytes_ppc.hpp
--- a/src/cpu/ppc/vm/bytes_ppc.hpp Thu Apr 24 16:21:06 2014 +0100
+++ b/src/cpu/ppc/vm/bytes_ppc.hpp Thu May 08 16:16:21 2014 +0200
@@ -35,6 +35,126 @@
// Can I count on address always being a pointer to an unsigned char? Yes.
+#if defined(VM_LITTLE_ENDIAN)
+
+ // Returns true, if the byte ordering used by Java is different from the native byte ordering
+ // of the underlying machine. For example, true for Intel x86, False, for Solaris on Sparc.
+ static inline bool is_Java_byte_ordering_different() { return true; }
+
+ // Forward declarations of the compiler-dependent implementation
+ static inline u2 swap_u2(u2 x);
+ static inline u4 swap_u4(u4 x);
+ static inline u8 swap_u8(u8 x);
+
+ static inline u2 get_native_u2(address p) {
+ return (intptr_t(p) & 1) == 0
+ ? *(u2*)p
+ : ( u2(p[1]) << 8 )
+ | ( u2(p[0]) );
+ }
+
+ static inline u4 get_native_u4(address p) {
+ switch (intptr_t(p) & 3) {
+ case 0: return *(u4*)p;
+
+ case 2: return ( u4( ((u2*)p)[1] ) << 16 )
+ | ( u4( ((u2*)p)[0] ) );
+
+ default: return ( u4(p[3]) << 24 )
+ | ( u4(p[2]) << 16 )
+ | ( u4(p[1]) << 8 )
+ | u4(p[0]);
+ }
+ }
+
+ static inline u8 get_native_u8(address p) {
+ switch (intptr_t(p) & 7) {
+ case 0: return *(u8*)p;
+
+ case 4: return ( u8( ((u4*)p)[1] ) << 32 )
+ | ( u8( ((u4*)p)[0] ) );
+
+ case 2: return ( u8( ((u2*)p)[3] ) << 48 )
+ | ( u8( ((u2*)p)[2] ) << 32 )
+ | ( u8( ((u2*)p)[1] ) << 16 )
+ | ( u8( ((u2*)p)[0] ) );
+
+ default: return ( u8(p[7]) << 56 )
+ | ( u8(p[6]) << 48 )
+ | ( u8(p[5]) << 40 )
+ | ( u8(p[4]) << 32 )
+ | ( u8(p[3]) << 24 )
+ | ( u8(p[2]) << 16 )
+ | ( u8(p[1]) << 8 )
+ | u8(p[0]);
+ }
+ }
+
+
+
+ static inline void put_native_u2(address p, u2 x) {
+ if ( (intptr_t(p) & 1) == 0 ) *(u2*)p = x;
More information about the distro-pkg-dev
mailing list