This commit is contained in:
Jesper Wilhelmsson 2017-11-11 01:21:09 +01:00
commit fdee542113
654 changed files with 12550 additions and 7320 deletions

View File

@ -67,6 +67,7 @@ ifeq ($(INCLUDE_GRAAL), true)
$(SRC_DIR)/org.graalvm.compiler.phases.common/src \
$(SRC_DIR)/org.graalvm.compiler.serviceprovider/src \
$(SRC_DIR)/org.graalvm.compiler.virtual/src \
$(SRC_DIR)/org.graalvm.graphio/src \
$(SRC_DIR)/org.graalvm.util/src \
$(VM_CI_SRC_DIR)/jdk.vm.ci.code/src \
$(VM_CI_SRC_DIR)/jdk.vm.ci.common/src \
@ -125,6 +126,7 @@ ifeq ($(INCLUDE_GRAAL), true)
$(SRC_DIR)/org.graalvm.compiler.nodeinfo/src \
$(SRC_DIR)/org.graalvm.compiler.options/src \
$(SRC_DIR)/org.graalvm.compiler.serviceprovider/src \
$(SRC_DIR)/org.graalvm.graphio/src \
$(SRC_DIR)/org.graalvm.util/src \
$(VM_CI_SRC_DIR)/jdk.vm.ci.code/src \
$(VM_CI_SRC_DIR)/jdk.vm.ci.common/src \

View File

@ -824,7 +824,7 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: {
server: "javare",
revision: "4.2",
build_number: "b09",
build_number: "b10",
checksum_file: "MD5_VALUES",
file: "jtreg_bin-4.2.zip",
environment_name: "JT_HOME",

View File

@ -42,7 +42,7 @@ $(INCLUDE_DST_DIR)/%.h: $(TOPDIR)/src/java.base/share/native/include/%.h
$(call install-file)
$(INCLUDE_DST_OS_DIR)/%.h: \
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include/%.h
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include/%.h
$(call install-file)
################################################################################

View File

@ -57,8 +57,8 @@ JVM_CFLAGS_INCLUDES += \
$(patsubst %,-I%,$(filter-out $(JVM_VARIANT_OUTPUTDIR)/gensrc/%, $(JVM_SRC_DIRS))) \
-I$(JVM_VARIANT_OUTPUTDIR)/gensrc \
-I$(TOPDIR)/src/hotspot/share/precompiled \
-I$(TOPDIR)/src/hotspot/share/prims \
-I$(TOPDIR)/src/java.base/share/native/include \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \
#
# INCLUDE_SUFFIX_* is only meant for including the proper

View File

@ -57,7 +57,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
endif
else ifeq ($(OPENJDK_TARGET_OS), solaris)
LIBJSIG_CFLAGS := -m64 -KPIC -mt -I $(TOPDIR)/src/hotspot/os/solaris
LIBJSIG_CFLAGS := -m64 -KPIC -mt -I $(TOPDIR)/src/java.base/unix/native/include
LIBJSIG_LDFLAGS := -m64 -mt -xnolib
LIBJSIG_LIBS := $(LIBDL)

View File

@ -31,6 +31,7 @@ SUNWprivate_1.1 {
Agent_OnAttach;
Java_sun_instrument_InstrumentationImpl_isModifiableClass0;
Java_sun_instrument_InstrumentationImpl_isRetransformClassesSupported0;
Java_sun_instrument_InstrumentationImpl_setHasTransformers;
Java_sun_instrument_InstrumentationImpl_setHasRetransformableTransformers;
Java_sun_instrument_InstrumentationImpl_retransformClasses0;
Java_sun_instrument_InstrumentationImpl_getAllLoadedClasses0;

View File

@ -63,6 +63,8 @@ BUILD_HOTSPOT_JTREG_NATIVE_SRC += \
$(TOPDIR)/test/hotspot/jtreg/runtime/RedefineTests \
$(TOPDIR)/test/hotspot/jtreg/compiler/floatingpoint/ \
$(TOPDIR)/test/hotspot/jtreg/compiler/calls \
$(TOPDIR)/test/hotspot/jtreg/compiler/runtime/criticalnatives/lookup \
$(TOPDIR)/test/hotspot/jtreg/compiler/runtime/criticalnatives/argumentcorruption \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorInfo \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/GetNamedModule \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/IsModifiableModule \

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>mx.jvmci</name>
<comment></comment>
<projects>
<project>mx</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/mx.jvmci</path>
</pydev_pathproperty>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/mx</path>
</pydev_pathproperty>
</pydev_project>

View File

@ -42,11 +42,6 @@ _suite = mx.suite('jvmci')
JVMCI_VERSION = 9
"""
Top level directory of the JDK source workspace.
"""
_jdkSourceRoot = dirname(_suite.dir)
_JVMCI_JDK_TAG = 'jvmci'
_minVersion = mx.VersionSpec('1.9')
@ -145,7 +140,7 @@ def isJVMCIEnabled(vm):
return True
def _makehelp():
return subprocess.check_output([mx.gmake_cmd(), 'help'], cwd=_jdkSourceRoot)
return subprocess.check_output([mx.gmake_cmd(), 'help'], cwd=_get_jdk_dir())
def _runmake(args):
"""run the JDK make process
@ -155,12 +150,12 @@ To build hotspot and import it into the JDK: "mx make hotspot import-hotspot"
jdkBuildDir = _get_jdk_build_dir()
if not exists(jdkBuildDir):
# JDK9 must be bootstrapped with a JDK8
compliance = mx.JavaCompliance('8')
jdk8 = mx.get_jdk(compliance.exactMatch, versionDescription=compliance.value)
# JDK10 must be bootstrapped with a JDK9
compliance = mx.JavaCompliance('9')
jdk9 = mx.get_jdk(compliance.exactMatch, versionDescription=compliance.value)
cmd = ['sh', 'configure', '--with-debug-level=' + _vm.debugLevel, '--with-native-debug-symbols=external', '--disable-precompiled-headers', '--with-jvm-features=graal',
'--with-jvm-variants=' + _vm.jvmVariant, '--disable-warnings-as-errors', '--with-boot-jdk=' + jdk8.home, '--with-jvm-features=graal']
mx.run(cmd, cwd=_jdkSourceRoot)
'--with-jvm-variants=' + _vm.jvmVariant, '--disable-warnings-as-errors', '--with-boot-jdk=' + jdk9.home, '--with-jvm-features=graal']
mx.run(cmd, cwd=_get_jdk_dir())
cmd = [mx.gmake_cmd(), 'CONF=' + _vm.debugLevel]
if mx.get_opts().verbose:
cmd.append('LOG=debug')
@ -170,11 +165,11 @@ To build hotspot and import it into the JDK: "mx make hotspot import-hotspot"
if not mx.get_opts().verbose:
mx.log('--------------- make execution ----------------------')
mx.log('Working directory: ' + _jdkSourceRoot)
mx.log('Working directory: ' + _get_jdk_dir())
mx.log('Command line: ' + ' '.join(cmd))
mx.log('-----------------------------------------------------')
mx.run(cmd, cwd=_jdkSourceRoot)
mx.run(cmd, cwd=_get_jdk_dir())
def _runmultimake(args):
"""run the JDK make process for one or more configurations"""

View File

@ -1489,6 +1489,17 @@ public:
#undef INSN
// Aliases for short forms of orn
void mvn(Register Rd, Register Rm,
enum shift_kind kind = LSL, unsigned shift = 0) {
orn(Rd, zr, Rm, kind, shift);
}
void mvnw(Register Rd, Register Rm,
enum shift_kind kind = LSL, unsigned shift = 0) {
ornw(Rd, zr, Rm, kind, shift);
}
// Add/subtract (shifted register)
#define INSN(NAME, size, op) \
void NAME(Register Rd, Register Rn, Register Rm, \

View File

@ -2657,9 +2657,9 @@ void LIR_Assembler::emit_updatecrc32(LIR_OpUpdateCRC32* op) {
__ adrp(res, ExternalAddress(StubRoutines::crc_table_addr()), offset);
if (offset) __ add(res, res, offset);
__ ornw(crc, zr, crc); // ~crc
__ mvnw(crc, crc); // ~crc
__ update_byte_crc32(crc, val, res);
__ ornw(res, zr, crc); // ~crc
__ mvnw(res, crc); // ~crc
}
void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {

View File

@ -1030,7 +1030,81 @@ void LIRGenerator::do_update_CRC32(Intrinsic* x) {
}
void LIRGenerator::do_update_CRC32C(Intrinsic* x) {
Unimplemented();
assert(UseCRC32CIntrinsics, "why are we here?");
// Make all state_for calls early since they can emit code
LIR_Opr result = rlock_result(x);
int flags = 0;
switch (x->id()) {
case vmIntrinsics::_updateBytesCRC32C:
case vmIntrinsics::_updateDirectByteBufferCRC32C: {
bool is_updateBytes = (x->id() == vmIntrinsics::_updateBytesCRC32C);
int offset = is_updateBytes ? arrayOopDesc::base_offset_in_bytes(T_BYTE) : 0;
LIRItem crc(x->argument_at(0), this);
LIRItem buf(x->argument_at(1), this);
LIRItem off(x->argument_at(2), this);
LIRItem end(x->argument_at(3), this);
buf.load_item();
off.load_nonconstant();
end.load_nonconstant();
// len = end - off
LIR_Opr len = end.result();
LIR_Opr tmpA = new_register(T_INT);
LIR_Opr tmpB = new_register(T_INT);
__ move(end.result(), tmpA);
__ move(off.result(), tmpB);
__ sub(tmpA, tmpB, tmpA);
len = tmpA;
LIR_Opr index = off.result();
if(off.result()->is_constant()) {
index = LIR_OprFact::illegalOpr;
offset += off.result()->as_jint();
}
LIR_Opr base_op = buf.result();
if (index->is_valid()) {
LIR_Opr tmp = new_register(T_LONG);
__ convert(Bytecodes::_i2l, index, tmp);
index = tmp;
}
if (offset) {
LIR_Opr tmp = new_pointer_register();
__ add(base_op, LIR_OprFact::intConst(offset), tmp);
base_op = tmp;
offset = 0;
}
LIR_Address* a = new LIR_Address(base_op,
index,
offset,
T_BYTE);
BasicTypeList signature(3);
signature.append(T_INT);
signature.append(T_ADDRESS);
signature.append(T_INT);
CallingConvention* cc = frame_map()->c_calling_convention(&signature);
const LIR_Opr result_reg = result_register_for(x->type());
LIR_Opr addr = new_pointer_register();
__ leal(LIR_OprFact::address(a), addr);
crc.load_item_force(cc->at(0));
__ move(addr, cc->at(1));
__ move(len, cc->at(2));
__ call_runtime_leaf(StubRoutines::updateBytesCRC32C(), getThreadTemp(), result_reg, cc->args());
__ move(result_reg, result);
break;
}
default: {
ShouldNotReachHere();
}
}
}
void LIRGenerator::do_FmaIntrinsic(Intrinsic* x) {

View File

@ -431,11 +431,11 @@ frame frame::sender_for_interpreter_frame(RegisterMap* map) const {
// This is the sp before any possible extension (adapter/locals).
intptr_t* unextended_sp = interpreter_frame_sender_sp();
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
if (map->update_map()) {
update_map_with_saved_link(map, (intptr_t**) addr_at(link_offset));
}
#endif // COMPILER2 || INCLUDE_JVMCI
#endif // COMPILER2_OR_JVMCI
return frame(sender_sp, unextended_sp, link(), sender_pc());
}

View File

@ -1,60 +0,0 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. 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.
*/
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
#if defined(SOLARIS) || defined(LINUX) || defined(_ALLBSD_SOURCE)
// Note: please do not change these without also changing jni_md.h in the JDK
// repository
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#else
#define JNIEXPORT
#define JNIIMPORT
#endif
#define JNICALL
typedef int jint;
typedef long jlong;
#else
#define JNIEXPORT __declspec(dllexport)
#define JNIIMPORT __declspec(dllimport)
#define JNICALL __stdcall
typedef int jint;
typedef __int64 jlong;
#endif
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */

View File

@ -26,6 +26,7 @@
#include <sys/types.h>
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "interpreter/interpreter.hpp"
@ -38,7 +39,6 @@
#include "opto/compile.hpp"
#include "opto/intrinsicnode.hpp"
#include "opto/node.hpp"
#include "prims/jvm.h"
#include "runtime/biasedLocking.hpp"
#include "runtime/icache.hpp"
#include "runtime/interfaceSupport.hpp"
@ -2929,6 +2929,105 @@ void MacroAssembler::update_word_crc32(Register crc, Register v, Register tmp,
eor(crc, crc, tmp);
}
void MacroAssembler::kernel_crc32_using_crc32(Register crc, Register buf,
Register len, Register tmp0, Register tmp1, Register tmp2,
Register tmp3) {
Label CRC_by64_loop, CRC_by4_loop, CRC_by1_loop, CRC_less64, CRC_by64_pre, CRC_by32_loop, CRC_less32, L_exit;
assert_different_registers(crc, buf, len, tmp0, tmp1, tmp2, tmp3);
mvnw(crc, crc);
subs(len, len, 128);
br(Assembler::GE, CRC_by64_pre);
BIND(CRC_less64);
adds(len, len, 128-32);
br(Assembler::GE, CRC_by32_loop);
BIND(CRC_less32);
adds(len, len, 32-4);
br(Assembler::GE, CRC_by4_loop);
adds(len, len, 4);
br(Assembler::GT, CRC_by1_loop);
b(L_exit);
BIND(CRC_by32_loop);
ldp(tmp0, tmp1, Address(post(buf, 16)));
subs(len, len, 32);
crc32x(crc, crc, tmp0);
ldr(tmp2, Address(post(buf, 8)));
crc32x(crc, crc, tmp1);
ldr(tmp3, Address(post(buf, 8)));
crc32x(crc, crc, tmp2);
crc32x(crc, crc, tmp3);
br(Assembler::GE, CRC_by32_loop);
cmn(len, 32);
br(Assembler::NE, CRC_less32);
b(L_exit);
BIND(CRC_by4_loop);
ldrw(tmp0, Address(post(buf, 4)));
subs(len, len, 4);
crc32w(crc, crc, tmp0);
br(Assembler::GE, CRC_by4_loop);
adds(len, len, 4);
br(Assembler::LE, L_exit);
BIND(CRC_by1_loop);
ldrb(tmp0, Address(post(buf, 1)));
subs(len, len, 1);
crc32b(crc, crc, tmp0);
br(Assembler::GT, CRC_by1_loop);
b(L_exit);
BIND(CRC_by64_pre);
sub(buf, buf, 8);
ldp(tmp0, tmp1, Address(buf, 8));
crc32x(crc, crc, tmp0);
ldr(tmp2, Address(buf, 24));
crc32x(crc, crc, tmp1);
ldr(tmp3, Address(buf, 32));
crc32x(crc, crc, tmp2);
ldr(tmp0, Address(buf, 40));
crc32x(crc, crc, tmp3);
ldr(tmp1, Address(buf, 48));
crc32x(crc, crc, tmp0);
ldr(tmp2, Address(buf, 56));
crc32x(crc, crc, tmp1);
ldr(tmp3, Address(pre(buf, 64)));
b(CRC_by64_loop);
align(CodeEntryAlignment);
BIND(CRC_by64_loop);
subs(len, len, 64);
crc32x(crc, crc, tmp2);
ldr(tmp0, Address(buf, 8));
crc32x(crc, crc, tmp3);
ldr(tmp1, Address(buf, 16));
crc32x(crc, crc, tmp0);
ldr(tmp2, Address(buf, 24));
crc32x(crc, crc, tmp1);
ldr(tmp3, Address(buf, 32));
crc32x(crc, crc, tmp2);
ldr(tmp0, Address(buf, 40));
crc32x(crc, crc, tmp3);
ldr(tmp1, Address(buf, 48));
crc32x(crc, crc, tmp0);
ldr(tmp2, Address(buf, 56));
crc32x(crc, crc, tmp1);
ldr(tmp3, Address(pre(buf, 64)));
br(Assembler::GE, CRC_by64_loop);
// post-loop
crc32x(crc, crc, tmp2);
crc32x(crc, crc, tmp3);
sub(len, len, 64);
add(buf, buf, 8);
cmn(len, 128);
br(Assembler::NE, CRC_less64);
BIND(L_exit);
mvnw(crc, crc);
}
/**
* @param crc register containing existing CRC (32-bit)
* @param buf register pointing to input byte buffer (byte*)
@ -2942,58 +3041,13 @@ void MacroAssembler::kernel_crc32(Register crc, Register buf, Register len,
Label L_by16, L_by16_loop, L_by4, L_by4_loop, L_by1, L_by1_loop, L_exit;
unsigned long offset;
ornw(crc, zr, crc);
if (UseCRC32) {
Label CRC_by64_loop, CRC_by4_loop, CRC_by1_loop;
subs(len, len, 64);
br(Assembler::GE, CRC_by64_loop);
adds(len, len, 64-4);
br(Assembler::GE, CRC_by4_loop);
adds(len, len, 4);
br(Assembler::GT, CRC_by1_loop);
b(L_exit);
BIND(CRC_by4_loop);
ldrw(tmp, Address(post(buf, 4)));
subs(len, len, 4);
crc32w(crc, crc, tmp);
br(Assembler::GE, CRC_by4_loop);
adds(len, len, 4);
br(Assembler::LE, L_exit);
BIND(CRC_by1_loop);
ldrb(tmp, Address(post(buf, 1)));
subs(len, len, 1);
crc32b(crc, crc, tmp);
br(Assembler::GT, CRC_by1_loop);
b(L_exit);
align(CodeEntryAlignment);
BIND(CRC_by64_loop);
subs(len, len, 64);
ldp(tmp, tmp3, Address(post(buf, 16)));
crc32x(crc, crc, tmp);
crc32x(crc, crc, tmp3);
ldp(tmp, tmp3, Address(post(buf, 16)));
crc32x(crc, crc, tmp);
crc32x(crc, crc, tmp3);
ldp(tmp, tmp3, Address(post(buf, 16)));
crc32x(crc, crc, tmp);
crc32x(crc, crc, tmp3);
ldp(tmp, tmp3, Address(post(buf, 16)));
crc32x(crc, crc, tmp);
crc32x(crc, crc, tmp3);
br(Assembler::GE, CRC_by64_loop);
adds(len, len, 64-4);
br(Assembler::GE, CRC_by4_loop);
adds(len, len, 4);
br(Assembler::GT, CRC_by1_loop);
BIND(L_exit);
ornw(crc, zr, crc);
kernel_crc32_using_crc32(crc, buf, len, table0, table1, table2, table3);
return;
}
mvnw(crc, crc);
adrp(table0, ExternalAddress(StubRoutines::crc_table_addr()), offset);
if (offset) add(table0, table0, offset);
add(table1, table0, 1*256*sizeof(juint));
@ -3171,7 +3225,7 @@ void MacroAssembler::kernel_crc32(Register crc, Register buf, Register len,
adds(len, len, 4);
br(Assembler::GT, L_by1_loop);
BIND(L_exit);
ornw(crc, zr, crc);
mvnw(crc, crc);
}
/**

View File

@ -1261,6 +1261,9 @@ private:
Register yz_idx1, Register yz_idx2,
Register tmp, Register tmp3, Register tmp4,
Register tmp7, Register product_hi);
void kernel_crc32_using_crc32(Register crc, Register buf,
Register len, Register tmp0, Register tmp1, Register tmp2,
Register tmp3);
public:
void multiply_to_len(Register x, Register xlen, Register y, Register ylen, Register z,
Register zlen, Register tmp1, Register tmp2, Register tmp3,

View File

@ -41,7 +41,7 @@
#ifdef COMPILER1
#include "c1/c1_Runtime1.hpp"
#endif
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
#include "adfiles/ad_aarch64.hpp"
#include "opto/runtime.hpp"
#endif
@ -114,7 +114,7 @@ class RegisterSaver {
};
OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_frame_words, int* total_frame_words, bool save_vectors) {
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
if (save_vectors) {
// Save upper half of vector registers
int vect_words = 32 * 8 / wordSize;
@ -2688,7 +2688,7 @@ uint SharedRuntime::out_preserve_stack_slots() {
return 0;
}
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
//------------------------------generate_uncommon_trap_blob--------------------
void SharedRuntime::generate_uncommon_trap_blob() {
// Allocate space for the code
@ -2894,7 +2894,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
}
#endif
}
#endif // COMPILER2
#endif // COMPILER2_OR_JVMCI
//------------------------------generate_handler_blob------
@ -3070,8 +3070,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const cha
return RuntimeStub::new_runtime_stub(name, &buffer, frame_complete, frame_size_in_words, oop_maps, true);
}
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
// This is here instead of runtime_x86_64.cpp because it uses SimpleRuntimeFrame
//
//------------------------------generate_exception_blob---------------------------
@ -3200,4 +3199,4 @@ void OptoRuntime::generate_exception_blob() {
// Set exception blob
_exception_blob = ExceptionBlob::create(&buffer, oop_maps, SimpleRuntimeFrame::framesize >> 1);
}
#endif // COMPILER2
#endif // COMPILER2_OR_JVMCI

View File

@ -4937,6 +4937,10 @@ class StubGenerator: public StubCodeGenerator {
StubRoutines::_crc_table_adr = (address)StubRoutines::aarch64::_crc_table;
StubRoutines::_updateBytesCRC32 = generate_updateBytesCRC32();
}
if (UseCRC32CIntrinsics) {
StubRoutines::_updateBytesCRC32C = generate_updateBytesCRC32C();
}
}
void generate_all() {
@ -5014,10 +5018,6 @@ class StubGenerator: public StubCodeGenerator {
StubRoutines::_sha256_implCompressMB = generate_sha256_implCompress(true, "sha256_implCompressMB");
}
if (UseCRC32CIntrinsics) {
StubRoutines::_updateBytesCRC32C = generate_updateBytesCRC32C();
}
// generate Adler32 intrinsics code
if (UseAdler32Intrinsics) {
StubRoutines::_updateBytesAdler32 = generate_updateBytesAdler32();

View File

@ -472,7 +472,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state,
#if INCLUDE_JVMCI
// Check if we need to take lock at entry of synchronized method. This can
// only occur on method entry so emit it only for vtos with step 0.
if (UseJVMCICompiler && state == vtos && step == 0) {
if (EnableJVMCI && state == vtos && step == 0) {
Label L;
__ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
__ cbz(rscratch1, L);
@ -483,7 +483,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state,
__ bind(L);
} else {
#ifdef ASSERT
if (UseJVMCICompiler) {
if (EnableJVMCI) {
Label L;
__ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
__ cbz(rscratch1, L);
@ -984,9 +984,9 @@ address TemplateInterpreterGenerator::generate_CRC32_update_entry() {
__ adrp(tbl, ExternalAddress(StubRoutines::crc_table_addr()), offset);
__ add(tbl, tbl, offset);
__ ornw(crc, zr, crc); // ~crc
__ mvnw(crc, crc); // ~crc
__ update_byte_crc32(crc, val, tbl);
__ ornw(crc, zr, crc); // ~crc
__ mvnw(crc, crc); // ~crc
// result in c_rarg0
@ -1061,8 +1061,44 @@ address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractI
return NULL;
}
// Not supported
/**
* Method entry for intrinsic-candidate (non-native) methods:
* int java.util.zip.CRC32C.updateBytes(int crc, byte[] b, int off, int end)
* int java.util.zip.CRC32C.updateDirectByteBuffer(int crc, long buf, int off, int end)
* Unlike CRC32, CRC32C does not have any methods marked as native
* CRC32C also uses an "end" variable instead of the length variable CRC32 uses
*/
address TemplateInterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
if (UseCRC32Intrinsics) {
address entry = __ pc();
// Prepare jump to stub using parameters from the stack
const Register crc = c_rarg0; // initial crc
const Register buf = c_rarg1; // source java byte array address
const Register len = c_rarg2; // len argument to the kernel
const Register end = len; // index of last element to process
const Register off = crc; // offset
__ ldrw(end, Address(esp)); // int end
__ ldrw(off, Address(esp, wordSize)); // int offset
__ sub(len, end, off);
__ ldr(buf, Address(esp, 2*wordSize)); // byte[] buf | long buf
__ add(buf, buf, off); // + offset
if (kind == Interpreter::java_util_zip_CRC32C_updateDirectByteBuffer) {
__ ldrw(crc, Address(esp, 4*wordSize)); // long crc
} else {
__ add(buf, buf, arrayOopDesc::base_offset_in_bytes(T_BYTE)); // + header size
__ ldrw(crc, Address(esp, 3*wordSize)); // long crc
}
__ andr(sp, r13, -16); // Restore the caller's SP
// Jump to the stub.
__ b(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32C()));
return entry;
}
return NULL;
}

View File

@ -33,7 +33,7 @@
#include "runtime/safepoint.hpp"
// ----------------------------------------------------------------------------
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
#define __ _masm.
// emit call stub, compiled java to interpreter
address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) {
@ -89,7 +89,7 @@ address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark)
int CompiledStaticCall::reloc_to_interp_stub() {
return 10; // 4 in emit_to_interp_stub + 1 in Java_Static_Call
}
#endif // COMPILER2 || JVMCI
#endif // COMPILER2_OR_JVMCI
// size of C2 call stub, compiled java to interpretor
int CompiledStaticCall::to_interp_stub_size() {

View File

@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "gc/shared/barrierSet.inline.hpp"
#include "gc/shared/cardTableModRefBS.inline.hpp"
#include "gc/shared/collectedHeap.hpp"

View File

@ -1,52 +0,0 @@
/*
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. 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.
*/
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
// Note: please do not change these without also changing jni_md.h in the JDK
// repository
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
#define JNIEXPORT __attribute__((externally_visible,visibility("default")))
#define JNIIMPORT __attribute__((externally_visible,visibility("default")))
#else
#define JNIEXPORT
#define JNIIMPORT
#endif
#define JNICALL
typedef int jint;
#if defined(_LP64)
typedef long jlong;
#else
typedef long long jlong;
#endif
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */

View File

@ -27,12 +27,12 @@
// Last synchronization: changeset f8c9417e3571
#include "precompiled.hpp"
#include "jvm.h"
#include "classfile/javaClasses.inline.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterRuntime.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#define __ _masm->

View File

@ -23,9 +23,9 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/macroAssembler.inline.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/os.inline.hpp"
#include "runtime/stubCodeGenerator.hpp"

View File

@ -23,9 +23,9 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/macroAssembler.inline.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/os.inline.hpp"
#include "runtime/stubCodeGenerator.hpp"

View File

@ -941,7 +941,7 @@ inline void Assembler::vpmsumh( VectorRegister d, VectorRegister a, VectorRegis
inline void Assembler::vpmsumw( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPMSUMW_OPCODE | vrt(d) | vra(a) | vrb(b)); }
// Vector Permute and Xor (introduced with Power 8)
inline void Assembler::vpermxor( VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c) { emit_int32( VPMSUMW_OPCODE | vrt(d) | vra(a) | vrb(b) | vrc(c)); }
inline void Assembler::vpermxor( VectorRegister d, VectorRegister a, VectorRegister b, VectorRegister c) { emit_int32( VPERMXOR_OPCODE | vrt(d) | vra(a) | vrb(b) | vrc(c)); }
// Transactional Memory instructions (introduced with Power 8)
inline void Assembler::tbegin_() { emit_int32( TBEGIN_OPCODE | rc(1)); }

View File

@ -69,7 +69,7 @@ define_pd_global(intx, InlineSmallCode, 1500);
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
define_pd_global(bool, UseMembar, false);
define_pd_global(bool, UseMembar, true);
define_pd_global(bool, PreserveFramePointer, false);

View File

@ -1,55 +0,0 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
#ifndef CPU_PPC_VM_JNI_PPC_H
#define CPU_PPC_VM_JNI_PPC_H
// Note: please do not change these without also changing jni_md.h in the JDK
// repository
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#else
#define JNIEXPORT
#define JNIIMPORT
#endif
#define JNICALL
typedef int jint;
#if defined(_LP64)
typedef long jlong;
#else
typedef long long jlong;
#endif
typedef signed char jbyte;
#endif // CPU_PPC_VM_JNI_PPC_H

View File

@ -24,12 +24,12 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/macroAssembler.inline.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "interpreter/interpreter.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#define __ _masm->

View File

@ -1469,8 +1469,31 @@ static void save_or_restore_arguments(MacroAssembler* masm,
}
// Save or restore single word registers.
for (int i = 0; i < total_in_args; i++) {
// PPC64: pass ints as longs: must only deal with floats here.
if (in_regs[i].first()->is_FloatRegister()) {
if (in_regs[i].first()->is_Register()) {
int offset = slot * VMRegImpl::stack_slot_size;
// Value lives in an input register. Save it on stack.
switch (in_sig_bt[i]) {
case T_BOOLEAN:
case T_CHAR:
case T_BYTE:
case T_SHORT:
case T_INT:
if (map != NULL) {
__ stw(in_regs[i].first()->as_Register(), offset, R1_SP);
} else {
__ lwa(in_regs[i].first()->as_Register(), offset, R1_SP);
}
slot++;
assert(slot <= stack_slots, "overflow (after INT or smaller stack slot)");
break;
case T_ARRAY:
case T_LONG:
// handled above
break;
case T_OBJECT:
default: ShouldNotReachHere();
}
} else if (in_regs[i].first()->is_FloatRegister()) {
if (in_sig_bt[i] == T_FLOAT) {
int offset = slot * VMRegImpl::stack_slot_size;
slot++;

View File

@ -24,11 +24,11 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "compiler/disassembler.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
#include "runtime/stubCodeGenerator.hpp"
@ -109,7 +109,8 @@ void VM_Version::initialize() {
if (PowerArchitecturePPC64 >= 8) {
if (FLAG_IS_DEFAULT(SuperwordUseVSX)) {
FLAG_SET_ERGO(bool, SuperwordUseVSX, true);
// TODO: Switch on when it works stable. Currently, MachSpillCopyNode::implementation code is missing.
//FLAG_SET_ERGO(bool, SuperwordUseVSX, true);
}
} else {
if (SuperwordUseVSX) {

View File

@ -277,7 +277,7 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
length.set_instruction(x->length());
length.load_item();
}
if (needs_store_check) {
if (needs_store_check || x->check_boolean()) {
value.load_item();
} else {
value.load_for_store(x->elt_type());
@ -327,11 +327,14 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
// Needs GC write barriers.
pre_barrier(LIR_OprFact::address(array_addr), LIR_OprFact::illegalOpr /* pre_val */,
true /* do_load */, false /* patch */, NULL);
__ move(value.result(), array_addr, null_check_info);
// Seems to be a precise.
}
LIR_Opr result = maybe_mask_boolean(x, array.result(), value.result(), null_check_info);
__ move(result, array_addr, null_check_info);
if (obj_store) {
// Precise card mark
post_barrier(LIR_OprFact::address(array_addr), value.result());
} else {
__ move(value.result(), array_addr, null_check_info);
}
}

View File

@ -71,7 +71,7 @@ define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGE
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
define_pd_global(bool, UseMembar, false);
define_pd_global(bool, UseMembar, true);
define_pd_global(bool, PreserveFramePointer, false);

View File

@ -843,6 +843,38 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
verify_oop(Z_tos, state);
}
void InterpreterMacroAssembler::narrow(Register result, Register ret_type) {
get_method(ret_type);
z_lg(ret_type, Address(ret_type, in_bytes(Method::const_offset())));
z_lb(ret_type, Address(ret_type, in_bytes(ConstMethod::result_type_offset())));
Label notBool, notByte, notChar, done;
// common case first
compareU32_and_branch(ret_type, T_INT, bcondEqual, done);
compareU32_and_branch(ret_type, T_BOOLEAN, bcondNotEqual, notBool);
z_nilf(result, 0x1);
z_bru(done);
bind(notBool);
compareU32_and_branch(ret_type, T_BYTE, bcondNotEqual, notByte);
z_lbr(result, result);
z_bru(done);
bind(notByte);
compareU32_and_branch(ret_type, T_CHAR, bcondNotEqual, notChar);
z_nilf(result, 0xffff);
z_bru(done);
bind(notChar);
// compareU32_and_branch(ret_type, T_SHORT, bcondNotEqual, notShort);
z_lhr(result, result);
// Nothing to do for T_INT
bind(done);
}
// remove activation
//
// Unlock the receiver if this is a synchronized method.

View File

@ -86,6 +86,8 @@ class InterpreterMacroAssembler: public MacroAssembler {
void dispatch_next_noverify_oop(TosState state, int step = 0);
void dispatch_via(TosState state, address* table);
void narrow(Register result, Register ret_type);
// Jump to an invoked target.
void prepare_to_jump_from_interpreted(Register method);
void jump_from_interpreted(Register method, Register temp);

View File

@ -24,12 +24,12 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/macroAssembler.inline.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "interpreter/interpreter.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#ifdef PRODUCT

View File

@ -1309,15 +1309,42 @@ static void save_or_restore_arguments(MacroAssembler *masm,
}
} else {
__ z_lg(reg, offset, Z_SP);
slot += VMRegImpl::slots_per_word;
assert(slot <= stack_slots, "overflow (after LONG/ARRAY stack slot)");
}
slot += VMRegImpl::slots_per_word;
assert(slot <= stack_slots, "overflow (after LONG/ARRAY stack slot)");
}
}
// Save or restore single word registers.
for (int i = 0; i < total_in_args; i++) {
if (in_regs[i].first()->is_FloatRegister()) {
if (in_regs[i].first()->is_Register()) {
int offset = slot * VMRegImpl::stack_slot_size;
// Value lives in an input register. Save it on stack.
switch (in_sig_bt[i]) {
case T_BOOLEAN:
case T_CHAR:
case T_BYTE:
case T_SHORT:
case T_INT: {
const Register reg = in_regs[i].first()->as_Register();
Address stackaddr(Z_SP, offset);
if (map != NULL) {
__ z_st(reg, stackaddr);
} else {
__ z_lgf(reg, stackaddr);
}
slot++;
assert(slot <= stack_slots, "overflow (after INT or smaller stack slot)");
break;
}
case T_ARRAY:
case T_LONG:
// handled above
break;
case T_OBJECT:
default: ShouldNotReachHere();
}
} else if (in_regs[i].first()->is_FloatRegister()) {
if (in_sig_bt[i] == T_FLOAT) {
int offset = slot * VMRegImpl::stack_slot_size;
slot++;
@ -1908,7 +1935,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
case T_ARRAY:
if (is_critical_native) {
int body_arg = cix;
cix -= 2; // Point to length arg.
cix -= 1; // Point to length arg.
unpack_array_argument(masm, in_regs[jix], in_elem_bt[jix], out_regs[body_arg], out_regs[cix], stack_slots);
break;
}

View File

@ -2377,6 +2377,12 @@ address TemplateInterpreterGenerator::generate_earlyret_entry_for (TosState stat
__ store_const(Address(RjvmtiState, JvmtiThreadState::earlyret_state_offset()),
JvmtiThreadState::earlyret_inactive, 4, 4, Z_R0_scratch);
if (state == itos) {
// Narrow result if state is itos but result type is smaller.
// Need to narrow in the return bytecode rather than in generate_return_entry
// since compiled code callers expect the result to already be narrowed.
__ narrow(Z_tos, Z_tmp_1); /* fall through */
}
__ remove_activation(state,
Z_tmp_1, // retaddr
false, // throw_monitor_exception

View File

@ -1174,8 +1174,20 @@ void TemplateTable::bastore() {
__ pop_i(Z_ARG3);
__ pop_ptr(Z_tmp_2);
// Z_tos : value
// Z_ARG3 : index
// Z_ARG3 : index
// Z_tmp_2 : array
// Need to check whether array is boolean or byte
// since both types share the bastore bytecode.
__ load_klass(Z_tmp_1, Z_tmp_2);
__ z_llgf(Z_tmp_1, Address(Z_tmp_1, Klass::layout_helper_offset()));
__ z_tmll(Z_tmp_1, Klass::layout_helper_boolean_diffbit());
Label L_skip;
__ z_bfalse(L_skip);
// if it is a T_BOOLEAN array, mask the stored value to 0/1
__ z_nilf(Z_tos, 0x1);
__ bind(L_skip);
// No index shift necessary - pass 0.
index_check(Z_tmp_2, Z_ARG3, 0); // Prefer index in Z_ARG3.
__ z_stc(Z_tos,
@ -2321,6 +2333,13 @@ void TemplateTable::_return(TosState state) {
__ bind(skip_register_finalizer);
}
if (state == itos) {
// Narrow result if state is itos but result type is smaller.
// Need to narrow in the return bytecode rather than in generate_return_entry
// since compiled code callers expect the result to already be narrowed.
__ narrow(Z_tos, Z_tmp_1); /* fall through */
}
__ remove_activation(state, Z_R14);
__ z_br(Z_R14);
}

View File

@ -24,11 +24,11 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/assembler.inline.hpp"
#include "compiler/disassembler.hpp"
#include "code/compiledIC.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "vm_version_s390.hpp"

View File

@ -74,7 +74,7 @@ define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
define_pd_global(bool, UseMembar, false);
define_pd_global(bool, UseMembar, true);
define_pd_global(bool, PreserveFramePointer, false);

View File

@ -1,44 +0,0 @@
/*
* Copyright (c) 1997, 2017, 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.
*/
// Note: please do not change these without also changing jni_md.h in the JDK
// repository
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#else
#define JNIEXPORT
#define JNIIMPORT
#endif
#define JNICALL
typedef int jint;
typedef long jlong;
typedef signed char jbyte;

View File

@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/macroAssembler.inline.hpp"
#include "compiler/disassembler.hpp"
#include "gc/shared/cardTableModRefBS.hpp"
@ -31,7 +32,6 @@
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "oops/klass.inline.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/interfaceSupport.hpp"

View File

@ -23,13 +23,13 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/macroAssembler.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interp_masm.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#define __ _masm->

View File

@ -319,7 +319,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
#if INCLUDE_JVMCI
// Check if we need to take lock at entry of synchronized method. This can
// only occur on method entry so emit it only for vtos with step 0.
if (UseJVMCICompiler && state == vtos && step == 0) {
if (EnableJVMCI && state == vtos && step == 0) {
Label L;
Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset());
__ ldbool(pending_monitor_enter_addr, Gtemp); // Load if pending monitor enter
@ -331,7 +331,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
__ bind(L);
} else {
#ifdef ASSERT
if (UseJVMCICompiler) {
if (EnableJVMCI) {
Label L;
Address pending_monitor_enter_addr(G2_thread, JavaThread::pending_monitorenter_offset());
__ ldbool(pending_monitor_enter_addr, Gtemp); // Load if pending monitor enter

View File

@ -23,11 +23,11 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/macroAssembler.inline.hpp"
#include "logging/log.hpp"
#include "logging/logStream.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
#include "runtime/stubCodeGenerator.hpp"

View File

@ -436,11 +436,11 @@ frame frame::sender_for_interpreter_frame(RegisterMap* map) const {
// This is the sp before any possible extension (adapter/locals).
intptr_t* unextended_sp = interpreter_frame_sender_sp();
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
if (map->update_map()) {
update_map_with_saved_link(map, (intptr_t**) addr_at(link_offset));
}
#endif // COMPILER2 || INCLUDE_JVMCI
#endif // COMPILER2_OR_JVMCI
return frame(sender_sp, unextended_sp, link(), sender_pc());
}

View File

@ -46,11 +46,11 @@ define_pd_global(uintx, CodeCacheSegmentSize, 64 TIERED_ONLY(+64)); // Tiered
// the the vep is aligned at CodeEntryAlignment whereas c2 only aligns
// the uep and the vep doesn't get real alignment but just slops on by
// only assured that the entry instruction meets the 5 byte size requirement.
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
define_pd_global(intx, CodeEntryAlignment, 32);
#else
define_pd_global(intx, CodeEntryAlignment, 16);
#endif // COMPILER2
#endif // COMPILER2_OR_JVMCI
define_pd_global(intx, OptoLoopAlignment, 16);
define_pd_global(intx, InlineFrequencyCount, 100);
define_pd_global(intx, InlineSmallCode, 1000);
@ -84,11 +84,7 @@ define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
#ifdef _ALLBSD_SOURCE
define_pd_global(bool, UseMembar, true);
#else
define_pd_global(bool, UseMembar, false);
#endif
// GC Ergo Flags
define_pd_global(size_t, CMSYoungGenPerWorker, 64*M); // default max size of CMS young gen, per GC worker thread

View File

@ -1,63 +0,0 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. 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.
*/
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
#if defined(_WIN32)
#define JNIEXPORT __declspec(dllexport)
#define JNIIMPORT __declspec(dllimport)
#define JNICALL __stdcall
typedef int jint;
typedef __int64 jlong;
#else
// Note: please do not change these without also changing jni_md.h in the JDK
// repository
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#else
#define JNIEXPORT
#define JNIIMPORT
#endif
#define JNICALL
typedef int jint;
#if defined(_LP64)
typedef long jlong;
#else
typedef long long jlong;
#endif
#endif
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */

View File

@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "compiler/disassembler.hpp"
@ -32,7 +33,6 @@
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "oops/klass.inline.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/interfaceSupport.hpp"

View File

@ -23,13 +23,13 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/macroAssembler.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterRuntime.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "prims/methodHandles.hpp"
#define __ _masm->

View File

@ -151,7 +151,7 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_
if (UseAVX < 3) {
num_xmm_regs = num_xmm_regs/2;
}
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
if (save_vectors) {
assert(UseAVX > 0, "Vectors larger than 16 byte long are supported only with AVX");
assert(MaxVectorSize <= 64, "Only up to 64 byte long vectors are supported");
@ -260,7 +260,7 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_
}
}
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
if (save_vectors) {
off = ymm0_off;
int delta = ymm1_off - off;
@ -270,7 +270,7 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_
off += delta;
}
}
#endif // COMPILER2 || INCLUDE_JVMCI
#endif // COMPILER2_OR_JVMCI
// %%% These should all be a waste but we'll keep things as they were for now
if (true) {
@ -323,7 +323,7 @@ void RegisterSaver::restore_live_registers(MacroAssembler* masm, bool restore_ve
__ addptr(rsp, frame::arg_reg_save_area_bytes);
}
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
if (restore_vectors) {
assert(UseAVX > 0, "Vectors larger than 16 byte long are supported only with AVX");
assert(MaxVectorSize <= 64, "Only up to 64 byte long vectors are supported");
@ -2183,7 +2183,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// critical natives they are offset down.
GrowableArray<int> arg_order(2 * total_in_args);
VMRegPair tmp_vmreg;
tmp_vmreg.set1(rbx->as_VMReg());
tmp_vmreg.set2(rbx->as_VMReg());
if (!is_critical_native) {
for (int i = total_in_args - 1, c_arg = total_c_args - 1; i >= 0; i--, c_arg--) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2017, 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
@ -3433,6 +3433,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmExp() {
StubCodeMark mark(this, "StubRoutines", "libmExp");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -3458,6 +3460,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmLog() {
StubCodeMark mark(this, "StubRoutines", "libmLog");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -3483,6 +3487,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmLog10() {
StubCodeMark mark(this, "StubRoutines", "libmLog10");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -3508,6 +3514,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmPow() {
StubCodeMark mark(this, "StubRoutines", "libmPow");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -3533,6 +3541,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libm_reduce_pi04l() {
StubCodeMark mark(this, "StubRoutines", "libm_reduce_pi04l");
address start = __ pc();
BLOCK_COMMENT("Entry:");
@ -3543,6 +3553,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libm_sin_cos_huge() {
StubCodeMark mark(this, "StubRoutines", "libm_sin_cos_huge");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -3556,6 +3568,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmSin() {
StubCodeMark mark(this, "StubRoutines", "libmSin");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -3579,6 +3593,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmCos() {
StubCodeMark mark(this, "StubRoutines", "libmCos");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -3604,6 +3620,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libm_tan_cot_huge() {
StubCodeMark mark(this, "StubRoutines", "libm_tan_cot_huge");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -3617,6 +3635,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmTan() {
StubCodeMark mark(this, "StubRoutines", "libmTan");
address start = __ pc();
const XMMRegister x0 = xmm0;

View File

@ -4619,6 +4619,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmExp() {
StubCodeMark mark(this, "StubRoutines", "libmExp");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -4646,6 +4648,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmLog() {
StubCodeMark mark(this, "StubRoutines", "libmLog");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -4674,6 +4678,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmLog10() {
StubCodeMark mark(this, "StubRoutines", "libmLog10");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -4701,6 +4707,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmPow() {
StubCodeMark mark(this, "StubRoutines", "libmPow");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -4731,6 +4739,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmSin() {
StubCodeMark mark(this, "StubRoutines", "libmSin");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -4770,6 +4780,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmCos() {
StubCodeMark mark(this, "StubRoutines", "libmCos");
address start = __ pc();
const XMMRegister x0 = xmm0;
@ -4809,6 +4821,8 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_libmTan() {
StubCodeMark mark(this, "StubRoutines", "libmTan");
address start = __ pc();
const XMMRegister x0 = xmm0;

View File

@ -257,7 +257,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
#if INCLUDE_JVMCI
// Check if we need to take lock at entry of synchronized method. This can
// only occur on method entry so emit it only for vtos with step 0.
if ((UseJVMCICompiler || UseAOT) && state == vtos && step == 0) {
if ((EnableJVMCI || UseAOT) && state == vtos && step == 0) {
Label L;
__ cmpb(Address(thread, JavaThread::pending_monitorenter_offset()), 0);
__ jcc(Assembler::zero, L);
@ -270,7 +270,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
__ bind(L);
} else {
#ifdef ASSERT
if (UseJVMCICompiler) {
if (EnableJVMCI) {
Label L;
__ cmpb(Address(r15_thread, JavaThread::pending_monitorenter_offset()), 0);
__ jccb(Assembler::zero, L);

View File

@ -23,12 +23,12 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "asm/macroAssembler.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "logging/log.hpp"
#include "logging/logStream.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvm.h"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
#include "runtime/stubCodeGenerator.hpp"
@ -944,7 +944,7 @@ void VM_Version::get_processor_features() {
}
}
#endif
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
if (MaxVectorSize > 0) {
if (!is_power_of_2(MaxVectorSize)) {
warning("MaxVectorSize must be a power of 2");
@ -996,7 +996,7 @@ void VM_Version::get_processor_features() {
}
#endif // COMPILER2 && ASSERT
}
#endif // COMPILER2 || INCLUDE_JVMCI
#endif // COMPILER2_OR_JVMCI
#ifdef COMPILER2
#ifdef _LP64

View File

@ -1,50 +0,0 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2009 Red Hat, Inc.
* 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.
*/
// Note: please do not change these without also changing jni_md.h in the JDK
// repository
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#else
#define JNIEXPORT
#define JNIIMPORT
#endif
#define JNICALL
typedef int jint;
typedef signed char jbyte;
#ifdef _LP64
typedef long jlong;
#else
typedef long long jlong;
#endif

View File

@ -24,7 +24,7 @@
*/
#include "precompiled.hpp"
#include "prims/jvm.h"
#include "jvm.h"
#include "runtime/interfaceSupport.hpp"
#include "runtime/osThread.hpp"

View File

@ -1,106 +0,0 @@
/*
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_AIX_VM_JVM_AIX_H
#define OS_AIX_VM_JVM_AIX_H
// HotSpot integration note:
//
// This is derived from the JDK classic file:
// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
// All local includes have been commented out.
#ifndef JVM_MD_H
#define JVM_MD_H
/*
* This file is currently collecting system-specific dregs for the
* JNI conversion, which should be sorted out later.
*/
#include <dirent.h> /* For DIR */
// Must redefine NULL because the macro gets redefined to int 0
// by dirent.h. This redefinition is included later then the standard definition in
// globalDefinitions_<compiler>.hpp and leads to assertions in the VM initialization.
// We definitely need NULL to have the same lengh as an address pointer.
#ifdef _LP64
#undef NULL
#define NULL 0L
#else
#ifndef NULL
#define NULL 0
#endif
#endif
#include <sys/param.h> /* For MAXPATHLEN */
#include <sys/socket.h> /* For socklen_t */
#include <unistd.h> /* For F_OK, R_OK, W_OK */
#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}
#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
#define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"}
#define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"}
#define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"}
#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
#define JNI_LIB_PREFIX "lib"
#define JNI_LIB_SUFFIX ".so"
#define JVM_MAXPATHLEN MAXPATHLEN
#define JVM_R_OK R_OK
#define JVM_W_OK W_OK
#define JVM_X_OK X_OK
#define JVM_F_OK F_OK
/*
* File I/O
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
/* O Flags */
#define JVM_O_RDONLY O_RDONLY
#define JVM_O_WRONLY O_WRONLY
#define JVM_O_RDWR O_RDWR
#define JVM_O_O_APPEND O_APPEND
#define JVM_O_EXCL O_EXCL
#define JVM_O_CREAT O_CREAT
/* Signal definitions */
#define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */
#define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */
#define SHUTDOWN2_SIGNAL SIGINT
#define SHUTDOWN3_SIGNAL SIGTERM
#endif /* JVM_MD_H */
#endif // OS_AIX_VM_JVM_AIX_H

View File

@ -28,6 +28,7 @@
#pragma alloca
// no precompiled headers
#include "jvm.h"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
@ -35,7 +36,6 @@
#include "code/vtableStubs.hpp"
#include "compiler/compileBroker.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_aix.h"
#include "logging/log.hpp"
#include "libo4.hpp"
#include "libperfstat_aix.hpp"
@ -49,7 +49,6 @@
#include "os_share_aix.hpp"
#include "porting_aix.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
@ -3249,7 +3248,7 @@ void os::run_periodic_checks() {
}
// ReduceSignalUsage allows the user to override these handlers
// see comments at the very top and jvm_solaris.h
// see comments at the very top and jvm_md.h
if (!ReduceSignalUsage) {
DO_SIGNAL_CHECK(SHUTDOWN1_SIGNAL);
DO_SIGNAL_CHECK(SHUTDOWN2_SIGNAL);

View File

@ -25,7 +25,7 @@
#include "precompiled.hpp"
#ifdef __APPLE__
#include "prims/jvm.h"
#include "jvm.h"
#include "decoder_machO.hpp"
#include <cxxabi.h>

View File

@ -23,7 +23,7 @@
*/
#include "precompiled.hpp"
#include "prims/jvm.h"
#include "jvm.h"
#include "runtime/interfaceSupport.hpp"
#include "runtime/osThread.hpp"

View File

@ -1,115 +0,0 @@
/*
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_BSD_VM_JVM_BSD_H
#define OS_BSD_VM_JVM_BSD_H
/*
// HotSpot integration note:
//
// This is derived from the JDK classic file:
// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
// All local includes have been commented out.
*/
#ifndef JVM_MD_H
#define JVM_MD_H
/*
* This file is currently collecting system-specific dregs for the
* JNI conversion, which should be sorted out later.
*/
#include <dirent.h> /* For DIR */
#include <sys/param.h> /* For MAXPATHLEN */
#include <sys/socket.h> /* For socklen_t */
#include <unistd.h> /* For F_OK, R_OK, W_OK */
#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}
#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
#define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"}
#define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"}
#define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"}
#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
#define JNI_LIB_PREFIX "lib"
#ifdef __APPLE__
#define JNI_LIB_SUFFIX ".dylib"
#else
#define JNI_LIB_SUFFIX ".so"
#endif
// Hack: MAXPATHLEN is 4095 on some Bsd and 4096 on others. This may
// cause problems if JVM and the rest of JDK are built on different
// Bsd releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
// so buffers declared in VM are always >= 4096.
#define JVM_MAXPATHLEN MAXPATHLEN + 1
#define JVM_R_OK R_OK
#define JVM_W_OK W_OK
#define JVM_X_OK X_OK
#define JVM_F_OK F_OK
/*
* File I/O
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
/* O Flags */
#define JVM_O_RDONLY O_RDONLY
#define JVM_O_WRONLY O_WRONLY
#define JVM_O_RDWR O_RDWR
#define JVM_O_O_APPEND O_APPEND
#define JVM_O_EXCL O_EXCL
#define JVM_O_CREAT O_CREAT
/* Signal definitions */
#define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */
#define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */
#define SHUTDOWN2_SIGNAL SIGINT
#define SHUTDOWN3_SIGNAL SIGTERM
#ifndef SIGRTMIN
#ifdef __OpenBSD__
#define SIGRTMIN 1
#else
#define SIGRTMIN 33
#endif
#endif
#ifndef SIGRTMAX
#ifdef __OpenBSD__
#define SIGRTMAX 31
#else
#define SIGRTMAX 63
#endif
#endif
#endif /* JVM_MD_H */
#endif // OS_BSD_VM_JVM_BSD_H

View File

@ -23,6 +23,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
@ -31,7 +32,6 @@
#include "compiler/compileBroker.hpp"
#include "compiler/disassembler.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_bsd.h"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/filemap.hpp"
@ -39,7 +39,6 @@
#include "os_bsd.inline.hpp"
#include "os_share_bsd.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
@ -3240,7 +3239,7 @@ void os::run_periodic_checks() {
// ReduceSignalUsage allows the user to override these handlers
// see comments at the very top and jvm_solaris.h
// see comments at the very top and jvm_md.h
if (!ReduceSignalUsage) {
DO_SIGNAL_CHECK(SHUTDOWN1_SIGNAL);
DO_SIGNAL_CHECK(SHUTDOWN2_SIGNAL);

View File

@ -22,7 +22,7 @@
*
*/
#include "prims/jvm.h"
#include "jvm.h"
#include "utilities/decoder_elf.hpp"
#include <cxxabi.h>

View File

@ -23,7 +23,7 @@
*/
#include "precompiled.hpp"
#include "prims/jvm.h"
#include "jvm.h"
#include "runtime/interfaceSupport.hpp"
#include "runtime/osThread.hpp"

View File

@ -1,97 +0,0 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_LINUX_VM_JVM_LINUX_H
#define OS_LINUX_VM_JVM_LINUX_H
/*
// HotSpot integration note:
//
// This is derived from the JDK classic file:
// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
// All local includes have been commented out.
*/
#ifndef JVM_MD_H
#define JVM_MD_H
/*
* This file is currently collecting system-specific dregs for the
* JNI conversion, which should be sorted out later.
*/
#include <dirent.h> /* For DIR */
#include <sys/param.h> /* For MAXPATHLEN */
#include <sys/socket.h> /* For socklen_t */
#include <unistd.h> /* For F_OK, R_OK, W_OK */
#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}
#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
#define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"}
#define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"}
#define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"}
#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
#define JNI_LIB_PREFIX "lib"
#define JNI_LIB_SUFFIX ".so"
// Hack: MAXPATHLEN is 4095 on some Linux and 4096 on others. This may
// cause problems if JVM and the rest of JDK are built on different
// Linux releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
// so buffers declared in VM are always >= 4096.
#define JVM_MAXPATHLEN MAXPATHLEN + 1
#define JVM_R_OK R_OK
#define JVM_W_OK W_OK
#define JVM_X_OK X_OK
#define JVM_F_OK F_OK
/*
* File I/O
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
/* O Flags */
#define JVM_O_RDONLY O_RDONLY
#define JVM_O_WRONLY O_WRONLY
#define JVM_O_RDWR O_RDWR
#define JVM_O_O_APPEND O_APPEND
#define JVM_O_EXCL O_EXCL
#define JVM_O_CREAT O_CREAT
/* Signal definitions */
#define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */
#define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */
#define SHUTDOWN2_SIGNAL SIGINT
#define SHUTDOWN3_SIGNAL SIGTERM
#endif /* JVM_MD_H */
#endif // OS_LINUX_VM_JVM_LINUX_H

View File

@ -23,6 +23,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
@ -31,7 +32,6 @@
#include "compiler/compileBroker.hpp"
#include "compiler/disassembler.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_linux.h"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/filemap.hpp"
@ -39,7 +39,6 @@
#include "os_linux.inline.hpp"
#include "os_share_linux.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
@ -4664,7 +4663,7 @@ void os::run_periodic_checks() {
#endif
// ReduceSignalUsage allows the user to override these handlers
// see comments at the very top and jvm_solaris.h
// see comments at the very top and jvm_md.h
if (!ReduceSignalUsage) {
DO_SIGNAL_CHECK(SHUTDOWN1_SIGNAL);
DO_SIGNAL_CHECK(SHUTDOWN2_SIGNAL);

View File

@ -22,8 +22,8 @@
*
*/
#include "jvm.h"
#include "utilities/globalDefinitions.hpp"
#include "prims/jvm.h"
#include "runtime/frame.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/os.hpp"

View File

@ -23,7 +23,7 @@
*/
#include "precompiled.hpp"
#include "prims/jvm.h"
#include "jvm.h"
#include "runtime/interfaceSupport.hpp"
#include "runtime/osThread.hpp"

View File

@ -1,98 +0,0 @@
/*
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_SOLARIS_VM_JVM_SOLARIS_H
#define OS_SOLARIS_VM_JVM_SOLARIS_H
/*
// HotSpot integration note:
//
// This is derived from the JDK classic file:
// "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
// All local includes have been commented out.
*/
#ifndef JVM_MD_H
#define JVM_MD_H
/*
* This file is currently collecting system-specific dregs for the
* JNI conversion, which should be sorted out later.
*/
#include <dirent.h> /* For DIR */
#include <sys/param.h> /* For MAXPATHLEN */
#include <sys/socket.h> /* For socklen_t */
#include <unistd.h> /* For F_OK, R_OK, W_OK */
#include <sys/int_types.h> /* for intptr_t types (64 Bit cleanliness) */
#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}
#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
#define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"}
#define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"}
#define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"}
#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
#define JNI_LIB_PREFIX "lib"
#define JNI_LIB_SUFFIX ".so"
#define JVM_MAXPATHLEN MAXPATHLEN
#define JVM_R_OK R_OK
#define JVM_W_OK W_OK
#define JVM_X_OK X_OK
#define JVM_F_OK F_OK
/*
* File I/O
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
/* O Flags */
#define JVM_O_RDONLY O_RDONLY
#define JVM_O_WRONLY O_WRONLY
#define JVM_O_RDWR O_RDWR
#define JVM_O_O_APPEND O_APPEND
#define JVM_O_EXCL O_EXCL
#define JVM_O_CREAT O_CREAT
/* Signal definitions */
#define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */
#define ASYNC_SIGNAL SIGJVM2 /* Event-based suspend/resume support */
#define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */
#define SHUTDOWN2_SIGNAL SIGINT
#define SHUTDOWN3_SIGNAL SIGTERM
/* With 1.4.1 libjsig added versioning: used in os_solaris.cpp and jsig.c */
#define JSIG_VERSION_1_4_1 0x30140100
#endif /* JVM_MD_H */
#endif // OS_SOLARIS_VM_JVM_SOLARIS_H

View File

@ -23,6 +23,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
@ -31,7 +32,6 @@
#include "compiler/compileBroker.hpp"
#include "compiler/disassembler.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_solaris.h"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/filemap.hpp"
@ -39,7 +39,6 @@
#include "os_share_solaris.hpp"
#include "os_solaris.inline.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"

View File

@ -23,7 +23,7 @@
*/
#include "precompiled.hpp"
#include "prims/jvm.h"
#include "jvm.h"
#include "runtime/interfaceSupport.hpp"
#include "runtime/osThread.hpp"

View File

@ -1,118 +0,0 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_WINDOWS_VM_JVM_WINDOWS_H
#define OS_WINDOWS_VM_JVM_WINDOWS_H
#ifndef _JAVASOFT_JVM_MD_H_
#define _JAVASOFT_JVM_MD_H_
/*
* This file is currently collecting system-specific dregs for the
* JNI conversion, which should be sorted out later.
*/
// JDK7 requires VS2010
#if _MSC_VER >= 1600
// JDK7 minimum platform requirement: Windows XP
#if _WIN32_WINNT < 0x0501
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#endif
#include <windows.h>
#include <Psapi.h>
#include <Tlhelp32.h>
typedef int socklen_t;
#define JNI_ONLOAD_SYMBOLS {"_JNI_OnLoad@8", "JNI_OnLoad"}
#define JNI_ONUNLOAD_SYMBOLS {"_JNI_OnUnload@8", "JNI_OnUnload"}
#define JVM_ONLOAD_SYMBOLS {"_JVM_OnLoad@12", "JVM_OnLoad"}
#define AGENT_ONLOAD_SYMBOLS {"_Agent_OnLoad@12", "Agent_OnLoad"}
#define AGENT_ONUNLOAD_SYMBOLS {"_Agent_OnUnload@4", "Agent_OnUnload"}
#define AGENT_ONATTACH_SYMBOLS {"_Agent_OnAttach@12", "Agent_OnAttach"}
#define JNI_LIB_PREFIX ""
#define JNI_LIB_SUFFIX ".dll"
struct dirent {
char d_name[MAX_PATH];
};
typedef struct {
struct dirent dirent;
char *path;
HANDLE handle;
WIN32_FIND_DATA find_data;
} DIR;
#include <stdlib.h>
#define JVM_MAXPATHLEN _MAX_PATH
#define JVM_R_OK 4
#define JVM_W_OK 2
#define JVM_X_OK 1
#define JVM_F_OK 0
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT void * JNICALL
JVM_GetThreadInterruptEvent();
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
/*
* File I/O
*/
#include <sys/stat.h>
/* O Flags */
#define JVM_O_RDONLY O_RDONLY
#define JVM_O_WRONLY O_WRONLY
#define JVM_O_RDWR O_RDWR
#define JVM_O_O_APPEND O_APPEND
#define JVM_O_EXCL O_EXCL
#define JVM_O_CREAT O_CREAT
/* Signals */
#define JVM_SIGINT SIGINT
#define JVM_SIGTERM SIGTERM
#define SHUTDOWN1_SIGNAL SIGINT /* Shutdown Hooks support. */
#define SHUTDOWN2_SIGNAL SIGTERM
#endif /* !_JAVASOFT_JVM_MD_H_ */
#endif // OS_WINDOWS_VM_JVM_WINDOWS_H

View File

@ -26,6 +26,7 @@
#define _WIN32_WINNT 0x0600
// no precompiled headers
#include "jvm.h"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
@ -34,7 +35,6 @@
#include "compiler/compileBroker.hpp"
#include "compiler/disassembler.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_windows.h"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/filemap.hpp"
@ -42,7 +42,6 @@
#include "os_share_windows.hpp"
#include "os_windows.inline.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
@ -100,6 +99,7 @@
#include <imagehlp.h> // For os::dll_address_to_function_name
// for enumerating dll libraries
#include <vdmdbg.h>
#include <psapi.h>
// for timer info max values which include all bits
#define ALL_64_BITS CONST64(-1)
@ -3656,7 +3656,7 @@ int os::win32::exit_process_or_thread(Ept what, int exit_code) {
static INIT_ONCE init_once_crit_sect = INIT_ONCE_STATIC_INIT;
static CRITICAL_SECTION crit_sect;
static volatile jint process_exiting = 0;
static volatile DWORD process_exiting = 0;
int i, j;
DWORD res;
HANDLE hproc, hthr;
@ -3675,7 +3675,7 @@ int os::win32::exit_process_or_thread(Ept what, int exit_code) {
if (what != EPT_THREAD) {
// Atomically set process_exiting before the critical section
// to increase the visibility between racing threads.
Atomic::cmpxchg((jint)GetCurrentThreadId(), &process_exiting, 0);
Atomic::cmpxchg(GetCurrentThreadId(), &process_exiting, (DWORD)0);
}
EnterCriticalSection(&crit_sect);
@ -3793,7 +3793,7 @@ int os::win32::exit_process_or_thread(Ept what, int exit_code) {
if (!registered &&
OrderAccess::load_acquire(&process_exiting) != 0 &&
process_exiting != (jint)GetCurrentThreadId()) {
process_exiting != GetCurrentThreadId()) {
// Some other thread is about to call exit(), so we don't let
// the current unregistered thread proceed to exit() or _endthreadex()
while (true) {

View File

@ -36,7 +36,7 @@
//
static bool initialized = false;
static volatile jint lock_count = -1;
static volatile int lock_count = -1;
static HANDLE lock_event;
static DWORD lock_owner = -1;

View File

@ -24,6 +24,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "asm/assembler.inline.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -32,12 +33,10 @@
#include "code/icBuffer.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_aix.h"
#include "memory/allocation.inline.hpp"
#include "nativeInst_ppc.hpp"
#include "os_share_aix.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "porting_aix.hpp"
#include "runtime/arguments.hpp"

View File

@ -23,6 +23,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "asm/macroAssembler.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -31,11 +32,9 @@
#include "code/icBuffer.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_bsd.h"
#include "memory/allocation.inline.hpp"
#include "os_share_bsd.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"

View File

@ -73,7 +73,7 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava)
frame ret_frame(ret_sp, ret_fp, addr.pc());
if (!ret_frame.safe_for_sender(jt)) {
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
// C2 and JVMCI use ebp as a general register see if NULL fp helps
frame ret_frame2(ret_sp, NULL, addr.pc());
if (!ret_frame2.safe_for_sender(jt)) {
@ -84,7 +84,7 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava)
#else
// nothing else to try if the frame isn't good
return false;
#endif /* COMPILER2 || INCLUDE_JVMCI */
#endif // COMPILER2_OR_JVMCI
}
*fr_addr = ret_frame;
return true;

View File

@ -29,6 +29,7 @@
#endif
// no precompiled headers
#include "jvm.h"
#include "assembler_zero.inline.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -36,12 +37,10 @@
#include "code/icBuffer.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_bsd.h"
#include "memory/allocation.inline.hpp"
#include "nativeInst_zero.hpp"
#include "os_share_bsd.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"

View File

@ -24,6 +24,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "asm/macroAssembler.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -33,11 +34,9 @@
#include "code/vtableStubs.hpp"
#include "code/nativeInst.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_linux.h"
#include "memory/allocation.inline.hpp"
#include "os_share_linux.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"
@ -234,8 +233,17 @@ frame os::get_sender_for_C_frame(frame* fr) {
}
intptr_t* _get_previous_fp() {
register intptr_t **ebp __asm__ (SPELL_REG_FP);
return (intptr_t*) *ebp; // we want what it points to.
register intptr_t **fp __asm__ (SPELL_REG_FP);
// fp is for this frame (_get_previous_fp). We want the fp for the
// caller of os::current_frame*(), so go up two frames. However, for
// optimized builds, _get_previous_fp() will be inlined, so only go
// up 1 frame in that case.
#ifdef _NMT_NOINLINE_
return **(intptr_t***)fp;
#else
return *fp;
#endif
}

View File

@ -23,6 +23,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "assembler_arm.inline.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -30,12 +31,10 @@
#include "code/icBuffer.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_linux.h"
#include "memory/allocation.inline.hpp"
#include "nativeInst_arm.hpp"
#include "os_share_linux.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"

View File

@ -24,6 +24,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "asm/assembler.inline.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -32,12 +33,10 @@
#include "code/icBuffer.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_linux.h"
#include "memory/allocation.inline.hpp"
#include "nativeInst_ppc.hpp"
#include "os_share_linux.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"

View File

@ -26,6 +26,7 @@
// This file is organized as os_linux_x86.cpp.
// no precompiled headers
#include "jvm.h"
#include "asm/assembler.inline.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -35,12 +36,10 @@
#include "code/vtableStubs.hpp"
#include "compiler/disassembler.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_linux.h"
#include "memory/allocation.inline.hpp"
#include "nativeInst_s390.hpp"
#include "os_share_linux.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"

View File

@ -23,6 +23,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "asm/macroAssembler.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -31,12 +32,10 @@
#include "code/icBuffer.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_linux.h"
#include "memory/allocation.inline.hpp"
#include "nativeInst_sparc.hpp"
#include "os_share_linux.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2017, 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
@ -27,58 +27,326 @@
#include "runtime/os.hpp"
#include "vm_version_sparc.hpp"
static bool cpuinfo_field_contains(const char* field, const char* value) {
char line[1024];
bool rv = false;
FILE* fp = fopen("/proc/cpuinfo", "r");
if (fp == NULL) {
return rv;
}
#define CPUINFO_LINE_SIZE 1024
while (fgets(line, sizeof(line), fp) != NULL) {
assert(strlen(line) < sizeof(line) - 1, "buffer line[1024] is too small.");
if (strncmp(line, field, strlen(field)) == 0) {
if (strstr(line, value) != NULL) {
rv = true;
class CPUinfo {
public:
CPUinfo(const char* field) : _string(NULL) {
char line[CPUINFO_LINE_SIZE];
FILE* fp = fopen("/proc/cpuinfo", "r");
if (fp != NULL) {
while (fgets(line, sizeof(line), fp) != NULL) {
assert(strlen(line) < sizeof(line) - 1,
"buffer too small (%d)", CPUINFO_LINE_SIZE);
const char* vstr = match_field(line, field);
if (vstr != NULL) {
// We have a matching line and a valid starting point to the value of
// the field, copy the string for keeps.
_string = strdup(vstr);
break;
}
}
break;
fclose(fp);
}
}
fclose(fp);
return rv;
}
~CPUinfo() { os::free((void*)_string); }
static bool detect_niagara() {
return cpuinfo_field_contains("cpu", "Niagara");
}
const char* value() const { return _string; }
static bool detect_M_family() {
return cpuinfo_field_contains("cpu", "SPARC-M");
}
bool valid() const { return _string != NULL; }
static bool detect_blkinit() {
return cpuinfo_field_contains("cpucaps", "blkinit");
}
int VM_Version::platform_features(int features) {
// Default to generic v9
features = generic_v9_m;
if (detect_niagara()) {
log_info(os, cpu)("Detected Linux on Niagara");
features = niagara1_m | T_family_m;
bool match(const char* s) const {
return valid() ? strcmp(_string, s) == 0 : false;
}
if (detect_M_family()) {
log_info(os, cpu)("Detected Linux on M family");
features = sun4v_m | generic_v9_m | M_family_m | T_family_m;
}
private:
const char* _string;
if (detect_blkinit()) {
features |= blk_init_instructions_m;
}
const char* match_field(char line[CPUINFO_LINE_SIZE], const char* field);
const char* match_alo(const char* text, const char* exp);
const char* match_seq(const char* text, const char* seq);
};
return features;
/* Given a line of text read from /proc/cpuinfo, determine if the property header
* matches the field specified, according to the following regexp: "<field>"\W+:\W+
*
* If we have a matching expression, return a pointer to the first character after
* the matching pattern, i.e. the "value", otherwise return NULL.
*/
const char* CPUinfo::match_field(char line[CPUINFO_LINE_SIZE], const char* field) {
return match_alo(match_seq(match_alo(match_seq(line, field), "\t "), ":"), "\t ");
}
/* Match a sequence of at-least-one character in the string expression (exp) to
* the text input.
*/
const char* CPUinfo::match_alo(const char* text, const char* exp) {
if (text == NULL) return NULL;
const char* chp;
for (chp = &text[0]; *chp != '\0'; chp++) {
if (strchr(exp, *chp) == NULL) break;
}
return text < chp ? chp : NULL;
}
/* Match an exact sequence of characters as specified by the string expression
* (seq) to the text input.
*/
const char* CPUinfo::match_seq(const char* text, const char* seq) {
if (text == NULL) return NULL;
while (*seq != '\0') {
if (*seq != *text++) break; else seq++;
}
return *seq == '\0' ? text : NULL;
}
typedef struct {
const uint32_t hash;
bool seen;
const char* const name;
const uint64_t mask;
} FeatureEntry;
static uint64_t parse_features(FeatureEntry feature_tbl[], const char input[]);
void VM_Version::platform_features() {
// Some of the features reported via "cpucaps", such as; 'flush', 'stbar',
// 'swap', 'muldiv', 'ultra3', 'blkinit', 'n2', 'mul32', 'div32', 'fsmuld'
// and 'v8plus', are either SPARC V8, supported by all HW or simply nonsense
// (the 'ultra3' "property").
//
// Entries marked as 'NYI' are not yet supported via "cpucaps" but are
// expected to have the names used in the table below (these are SPARC M7
// features or more recent).
//
// NOTE: Table sorted on lookup/hash ID.
static FeatureEntry s_feature_tbl[] = {
{ 0x006f, false, "v9", ISA_v9_msk }, // Mandatory
{ 0x00a6, false, "md5", ISA_md5_msk },
{ 0x00ce, false, "adi", ISA_adi_msk }, // NYI
{ 0x00d7, false, "ima", ISA_ima_msk },
{ 0x00d9, false, "aes", ISA_aes_msk },
{ 0x00db, false, "hpc", ISA_hpc_msk },
{ 0x00dc, false, "des", ISA_des_msk },
{ 0x00ed, false, "sha1", ISA_sha1_msk },
{ 0x00f2, false, "vis", ISA_vis1_msk },
{ 0x0104, false, "vis2", ISA_vis2_msk },
{ 0x0105, false, "vis3", ISA_vis3_msk },
{ 0x0114, false, "sha512", ISA_sha512_msk },
{ 0x0119, false, "sha256", ISA_sha256_msk },
{ 0x011a, false, "fmaf", ISA_fmaf_msk },
{ 0x0132, false, "popc", ISA_popc_msk },
{ 0x0140, false, "crc32c", ISA_crc32c_msk },
{ 0x0147, false, "vis3b", ISA_vis3b_msk }, // NYI
{ 0x017e, false, "pause", ISA_pause_msk },
{ 0x0182, false, "mwait", ISA_mwait_msk }, // NYI
{ 0x018b, false, "mpmul", ISA_mpmul_msk },
{ 0x018e, false, "sparc5", ISA_sparc5_msk }, // NYI
{ 0x01a9, false, "cbcond", ISA_cbcond_msk },
{ 0x01c3, false, "vamask", ISA_vamask_msk }, // NYI
{ 0x01ca, false, "kasumi", ISA_kasumi_msk },
{ 0x01e3, false, "xmpmul", ISA_xmpmul_msk }, // NYI
{ 0x022c, false, "montmul", ISA_mont_msk },
{ 0x0234, false, "montsqr", ISA_mont_msk },
{ 0x0238, false, "camellia", ISA_camellia_msk },
{ 0x024a, false, "ASIBlkInit", ISA_blk_init_msk },
{ 0x0284, false, "xmontmul", ISA_xmont_msk }, // NYI
{ 0x02e6, false, "pause_nsec", ISA_pause_nsec_msk }, // NYI
{ 0x0000, false, NULL, 0 }
};
CPUinfo caps("cpucaps"); // Read "cpucaps" from /proc/cpuinfo.
assert(caps.valid(), "must be");
_features = parse_features(s_feature_tbl, caps.value());
assert(has_v9(), "must be"); // Basic SPARC-V9 required (V8 not supported).
CPUinfo type("type");
bool is_sun4v = type.match("sun4v"); // All Oracle SPARC + Fujitsu Athena+
bool is_sun4u = type.match("sun4u"); // All other Fujitsu
uint64_t synthetic = 0;
if (is_sun4v) {
// Indirect and direct branches are equally fast.
synthetic = CPU_fast_ind_br_msk;
// Fast IDIV, BIS and LD available on Niagara Plus.
if (has_vis2()) {
synthetic |= (CPU_fast_idiv_msk | CPU_fast_ld_msk);
// ...on Core C4 however, we prefer not to use BIS.
if (!has_sparc5()) {
synthetic |= CPU_fast_bis_msk;
}
}
// Niagara Core C3 supports fast RDPC and block zeroing.
if (has_ima()) {
synthetic |= (CPU_fast_rdpc_msk | CPU_blk_zeroing_msk);
}
// Niagara Core C3 and C4 have slow CMOVE.
if (!has_ima()) {
synthetic |= CPU_fast_cmove_msk;
}
} else if (is_sun4u) {
// SPARC64 only have fast IDIV and RDPC.
synthetic |= (CPU_fast_idiv_msk | CPU_fast_rdpc_msk);
} else {
log_info(os, cpu)("Unable to derive CPU features: %s", type.value());
}
_features += synthetic; // Including CPU derived/synthetic features.
}
////////////////////////////////////////////////////////////////////////////////
static uint32_t uhash32(const char name[]);
static void update_table(FeatureEntry feature_tbl[], uint32_t hv,
const char* ch1p,
const char* endp);
/* Given a feature table, parse the input text holding the string value of
* 'cpucaps' as reported by '/proc/cpuinfo', in order to complete the table
* with information on each admissible feature (whether present or not).
*
* Return the composite bit-mask representing the features found.
*/
static uint64_t parse_features(FeatureEntry feature_tbl[], const char input[]) {
log_info(os, cpu)("Parse CPU features: %s\n", input);
#ifdef ASSERT
// Verify that hash value entries in the table are unique and ordered.
uint32_t prev = 0;
for (uint k = 0; feature_tbl[k].name != NULL; k++) {
feature_tbl[k].seen = false;
assert(feature_tbl[k].hash == uhash32(feature_tbl[k].name),
"feature '%s' has mismatching hash 0x%08x (expected 0x%08x).\n",
feature_tbl[k].name,
feature_tbl[k].hash,
uhash32(feature_tbl[k].name));
assert(prev < feature_tbl[k].hash,
"feature '%s' has invalid hash 0x%08x (previous is 0x%08x).\n",
feature_tbl[k].name,
feature_tbl[k].hash,
prev);
prev = feature_tbl[k].hash;
}
#endif
// Identify features from the input, consisting of a string with features
// separated by commas (or whitespace), e.g. "flush,muldiv,v9,mul32,div32,
// v8plus,popc,vis".
uint32_t hv = 0;
const char* ch1p = &input[0];
uint i = 0;
do {
char ch = input[i];
if (isalnum(ch) || ch == '_') {
hv += (ch - 32u);
}
else if (isspace(ch) || ch == ',' || ch == '\0') { // end-of-token
if (ch1p < &input[i]) {
update_table(feature_tbl, hv, ch1p, &input[i]);
}
ch1p = &input[i + 1]; hv = 0;
} else {
// Handle non-accepted input robustly.
log_info(os, cpu)("Bad token in feature string: '%c' (0x%02x).\n", ch, ch);
ch1p = &input[i + 1]; hv = 0;
}
}
while (input[i++] != '\0');
// Compute actual bit-mask representation.
uint64_t mask = 0;
for (uint k = 0; feature_tbl[k].name != NULL; k++) {
mask |= feature_tbl[k].seen ? feature_tbl[k].mask : 0;
}
return mask;
}
static uint32_t uhash32(const char name[]) {
uint32_t hv = 0;
for (uint i = 0; name[i] != '\0'; i++) {
hv += (name[i] - 32u);
}
return hv;
}
static bool verify_match(const char name[], const char* ch1p, const char* endp);
static void update_table(FeatureEntry feature_tbl[], uint32_t hv, const char* ch1p, const char* endp) {
assert(ch1p < endp, "at least one character");
// Look for a hash value in the table. Since this table is a small one (and
// is expected to stay small), we use a simple linear search (iff the table
// grows large, we may consider to adopt a binary ditto, or a perfect hash).
for (uint k = 0; feature_tbl[k].name != NULL; k++) {
uint32_t hash = feature_tbl[k].hash;
if (hash < hv) continue;
if (hash == hv) {
const char* name = feature_tbl[k].name;
if (verify_match(name, ch1p, endp)) {
feature_tbl[k].seen = true;
break;
}
}
// Either a non-matching feature (when hash == hv) or hash > hv. In either
// case we break out of the loop and terminate the search (note that the
// table is assumed to be uniquely sorted on the hash).
break;
}
}
static bool verify_match(const char name[], const char* ch1p, const char* endp) {
size_t len = strlen(name);
if (len != static_cast<size_t>(endp - ch1p)) {
return false;
}
for (uint i = 0; ch1p + i < endp; i++) {
if (name[i] != ch1p[i]) return false;
}
return true;
}

View File

@ -23,6 +23,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "asm/macroAssembler.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -31,11 +32,9 @@
#include "code/icBuffer.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_linux.h"
#include "memory/allocation.inline.hpp"
#include "os_share_linux.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"

View File

@ -74,7 +74,7 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava)
frame ret_frame(ret_sp, ret_fp, addr.pc());
if (!ret_frame.safe_for_sender(jt)) {
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
// C2 and JVMCI use ebp as a general register see if NULL fp helps
frame ret_frame2(ret_sp, NULL, addr.pc());
if (!ret_frame2.safe_for_sender(jt)) {
@ -85,7 +85,7 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava)
#else
// nothing else to try if the frame isn't good
return false;
#endif /* COMPILER2 || INCLUDE_JVMCI */
#endif // COMPILER2_OR_JVMCI
}
*fr_addr = ret_frame;
return true;

View File

@ -24,6 +24,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "assembler_zero.inline.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -31,12 +32,10 @@
#include "code/icBuffer.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_linux.h"
#include "memory/allocation.inline.hpp"
#include "nativeInst_zero.hpp"
#include "os_share_linux.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"

View File

@ -23,6 +23,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "asm/macroAssembler.hpp"
#include "macroAssembler_sparc.hpp"
#include "classfile/classLoader.hpp"
@ -32,12 +33,10 @@
#include "code/icBuffer.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_solaris.h"
#include "memory/allocation.inline.hpp"
#include "nativeInst_sparc.hpp"
#include "os_share_solaris.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"

View File

@ -23,6 +23,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "asm/macroAssembler.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -31,11 +32,9 @@
#include "code/icBuffer.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_solaris.h"
#include "memory/allocation.inline.hpp"
#include "os_share_solaris.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"

View File

@ -23,6 +23,7 @@
*/
// no precompiled headers
#include "jvm.h"
#include "asm/macroAssembler.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/systemDictionary.hpp"
@ -30,13 +31,11 @@
#include "code/icBuffer.hpp"
#include "code/vtableStubs.hpp"
#include "interpreter/interpreter.hpp"
#include "jvm_windows.h"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "nativeInst_x86.hpp"
#include "os_share_windows.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/extendedPC.hpp"

View File

@ -81,7 +81,7 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava)
frame ret_frame(ret_sp, ret_fp, addr.pc());
if (!ret_frame.safe_for_sender(jt)) {
#if defined(COMPILER2) || INCLUDE_JVMCI
#if COMPILER2_OR_JVMCI
// C2 and JVMCI use ebp as a general register see if NULL fp helps
frame ret_frame2(ret_sp, NULL, addr.pc());
if (!ret_frame2.safe_for_sender(jt)) {
@ -92,7 +92,7 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava)
#else
// nothing else to try if the frame isn't good
return false;
#endif /* COMPILER2 || INCLUDE_JVMCI */
#endif // COMPILER2_OR_JVMCI
}
*fr_addr = ret_frame;
return true;

View File

@ -490,6 +490,8 @@ void AOTCodeHeap::link_stub_routines_symbols() {
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_stub_routines_checkcast_arraycopy", address, StubRoutines::_checkcast_arraycopy);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_stub_routines_generic_arraycopy", address, StubRoutines::_generic_arraycopy);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_stub_routines_aescrypt_encryptBlock", address, StubRoutines::_aescrypt_encryptBlock);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_stub_routines_aescrypt_decryptBlock", address, StubRoutines::_aescrypt_decryptBlock);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_stub_routines_cipherBlockChaining_encryptAESCrypt", address, StubRoutines::_cipherBlockChaining_encryptAESCrypt);

View File

@ -22,12 +22,12 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "aot/aotCodeHeap.hpp"
#include "aot/aotLoader.inline.hpp"
#include "jvmci/jvmciRuntime.hpp"
#include "oops/method.hpp"
#include "prims/jvm.h"
#include "runtime/os.hpp"
#include "runtime/timerTrace.hpp"

View File

@ -23,13 +23,13 @@
*/
#include "precompiled.hpp"
#include "jvm.h"
#include "c1/c1_CFGPrinter.hpp"
#include "c1/c1_IR.hpp"
#include "c1/c1_InstructionPrinter.hpp"
#include "c1/c1_LIR.hpp"
#include "c1/c1_LinearScan.hpp"
#include "c1/c1_ValueStack.hpp"
#include "prims/jvm.h"
#ifndef PRODUCT

View File

@ -40,6 +40,10 @@ class Canonicalizer: InstructionVisitor {
void set_constant(jlong x) { set_canonical(new Constant(new LongConstant(x))); }
void set_constant(jfloat x) { set_canonical(new Constant(new FloatConstant(x))); }
void set_constant(jdouble x) { set_canonical(new Constant(new DoubleConstant(x))); }
#ifdef _WINDOWS
// jint is defined as long in jni_md.h, so convert from int to jint
void set_constant(int x) { set_constant((jint)x); }
#endif
void move_const_to_right(Op2* x);
void do_Op2(Op2* x);
void do_UnsafeRawOp(UnsafeRawOp* x);

View File

@ -213,7 +213,7 @@ bool Compiler::is_intrinsic_supported(const methodHandle& method) {
case vmIntrinsics::_updateCRC32:
case vmIntrinsics::_updateBytesCRC32:
case vmIntrinsics::_updateByteBufferCRC32:
#if defined(SPARC) || defined(S390) || defined(PPC64)
#if defined(SPARC) || defined(S390) || defined(PPC64) || defined(AARCH64)
case vmIntrinsics::_updateBytesCRC32C:
case vmIntrinsics::_updateDirectByteBufferCRC32C:
#endif

View File

@ -2507,7 +2507,7 @@ void LinearScan::compute_oop_map(IntervalWalker* iw, const LIR_OpVisitState &vis
// use).
ConstantOopWriteValue* LinearScan::_oop_null_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantOopWriteValue(NULL);
ConstantIntValue* LinearScan::_int_m1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(-1);
ConstantIntValue* LinearScan::_int_0_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(0);
ConstantIntValue* LinearScan::_int_0_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue((jint)0);
ConstantIntValue* LinearScan::_int_1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(1);
ConstantIntValue* LinearScan::_int_2_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(2);
LocationValue* _illegal_value = new (ResourceObj::C_HEAP, mtCompiler) LocationValue(Location());

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