8074457: Remove the non-Zero CPP Interpreter
Remove cppInterpreter assembly files and reorganize InterpreterGenerator includes Reviewed-by: goetz, bdelsart
This commit is contained in:
parent
d6e95be627
commit
ac0d55c188
@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "interpreter/bytecodeInterpreter.hpp"
|
||||
#include "interpreter/bytecodeInterpreter.inline.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "prims/jvmtiExport.hpp"
|
||||
#include "prims/jvmtiThreadState.hpp"
|
||||
#include "runtime/deoptimization.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "interp_masm_aarch64.hpp"
|
||||
|
||||
#ifdef CC_INTERP
|
||||
|
||||
#endif // CC_INTERP (all)
|
@ -1,116 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_AARCH64_VM_BYTECODEINTERPRETER_AARCH64_HPP
|
||||
#define CPU_AARCH64_VM_BYTECODEINTERPRETER_AARCH64_HPP
|
||||
|
||||
// Platform specific for C++ based Interpreter
|
||||
|
||||
private:
|
||||
|
||||
interpreterState _self_link; /* Previous interpreter state */ /* sometimes points to self??? */
|
||||
address _result_handler; /* temp for saving native result handler */
|
||||
intptr_t* _sender_sp; /* sender's sp before stack (locals) extension */
|
||||
|
||||
address _extra_junk1; /* temp to save on recompiles */
|
||||
address _extra_junk2; /* temp to save on recompiles */
|
||||
address _extra_junk3; /* temp to save on recompiles */
|
||||
// address dummy_for_native2; /* a native frame result handler would be here... */
|
||||
// address dummy_for_native1; /* native result type stored here in a interpreter native frame */
|
||||
address _extra_junk4; /* temp to save on recompiles */
|
||||
address _extra_junk5; /* temp to save on recompiles */
|
||||
address _extra_junk6; /* temp to save on recompiles */
|
||||
public:
|
||||
// we have an interpreter frame...
|
||||
inline intptr_t* sender_sp() {
|
||||
return _sender_sp;
|
||||
}
|
||||
|
||||
// The interpreter always has the frame anchor fully setup so we don't
|
||||
// have to do anything going to vm from the interpreter. On return
|
||||
// we do have to clear the flags in case they we're modified to
|
||||
// maintain the stack walking invariants.
|
||||
//
|
||||
#define SET_LAST_JAVA_FRAME()
|
||||
|
||||
#define RESET_LAST_JAVA_FRAME()
|
||||
|
||||
/*
|
||||
* Macros for accessing the stack.
|
||||
*/
|
||||
#undef STACK_INT
|
||||
#undef STACK_FLOAT
|
||||
#undef STACK_ADDR
|
||||
#undef STACK_OBJECT
|
||||
#undef STACK_DOUBLE
|
||||
#undef STACK_LONG
|
||||
|
||||
// JavaStack Implementation
|
||||
|
||||
#define GET_STACK_SLOT(offset) (*((intptr_t*) &topOfStack[-(offset)]))
|
||||
#define STACK_SLOT(offset) ((address) &topOfStack[-(offset)])
|
||||
#define STACK_ADDR(offset) (*((address *) &topOfStack[-(offset)]))
|
||||
#define STACK_INT(offset) (*((jint*) &topOfStack[-(offset)]))
|
||||
#define STACK_FLOAT(offset) (*((jfloat *) &topOfStack[-(offset)]))
|
||||
#define STACK_OBJECT(offset) (*((oop *) &topOfStack [-(offset)]))
|
||||
#define STACK_DOUBLE(offset) (((VMJavaVal64*) &topOfStack[-(offset)])->d)
|
||||
#define STACK_LONG(offset) (((VMJavaVal64 *) &topOfStack[-(offset)])->l)
|
||||
|
||||
#define SET_STACK_SLOT(value, offset) (*(intptr_t*)&topOfStack[-(offset)] = *(intptr_t*)(value))
|
||||
#define SET_STACK_ADDR(value, offset) (*((address *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_INT(value, offset) (*((jint *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_FLOAT(value, offset) (*((jfloat *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_OBJECT(value, offset) (*((oop *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_DOUBLE(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = (value))
|
||||
#define SET_STACK_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = \
|
||||
((VMJavaVal64*)(addr))->d)
|
||||
#define SET_STACK_LONG(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->l = (value))
|
||||
#define SET_STACK_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->l = \
|
||||
((VMJavaVal64*)(addr))->l)
|
||||
// JavaLocals implementation
|
||||
|
||||
#define LOCALS_SLOT(offset) ((intptr_t*)&locals[-(offset)])
|
||||
#define LOCALS_ADDR(offset) ((address)locals[-(offset)])
|
||||
#define LOCALS_INT(offset) ((jint)(locals[-(offset)]))
|
||||
#define LOCALS_FLOAT(offset) (*((jfloat*)&locals[-(offset)]))
|
||||
#define LOCALS_OBJECT(offset) ((oop)locals[-(offset)])
|
||||
#define LOCALS_DOUBLE(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->d)
|
||||
#define LOCALS_LONG(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->l)
|
||||
#define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)]))
|
||||
#define LOCALS_DOUBLE_AT(offset) (((address)&locals[-((offset) + 1)]))
|
||||
|
||||
#define SET_LOCALS_SLOT(value, offset) (*(intptr_t*)&locals[-(offset)] = *(intptr_t *)(value))
|
||||
#define SET_LOCALS_ADDR(value, offset) (*((address *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_INT(value, offset) (*((jint *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_FLOAT(value, offset) (*((jfloat *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_OBJECT(value, offset) (*((oop *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_DOUBLE(value, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = (value))
|
||||
#define SET_LOCALS_LONG(value, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = (value))
|
||||
#define SET_LOCALS_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = \
|
||||
((VMJavaVal64*)(addr))->d)
|
||||
#define SET_LOCALS_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = \
|
||||
((VMJavaVal64*)(addr))->l)
|
||||
|
||||
#endif // CPU_AARCH64_VM_BYTECODEINTERPRETER_AARCH64_HPP
|
@ -1,286 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_AARCH64_VM_BYTECODEINTERPRETER_AARCH64_INLINE_HPP
|
||||
#define CPU_AARCH64_VM_BYTECODEINTERPRETER_AARCH64_INLINE_HPP
|
||||
|
||||
// Inline interpreter functions for IA32
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMfloatAdd(jfloat op1, jfloat op2) { return op1 + op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatSub(jfloat op1, jfloat op2) { return op1 - op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatMul(jfloat op1, jfloat op2) { return op1 * op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatDiv(jfloat op1, jfloat op2) { return op1 / op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatRem(jfloat op1, jfloat op2) { return fmod(op1, op2); }
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMfloatNeg(jfloat op) { return -op; }
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMfloatCompare(jfloat op1, jfloat op2, int32_t direction) {
|
||||
return ( op1 < op2 ? -1 :
|
||||
op1 > op2 ? 1 :
|
||||
op1 == op2 ? 0 :
|
||||
(direction == -1 || direction == 1) ? direction : 0);
|
||||
|
||||
}
|
||||
|
||||
inline void BytecodeInterpreter::VMmemCopy64(uint32_t to[2], const uint32_t from[2]) {
|
||||
// x86 can do unaligned copies but not 64bits at a time
|
||||
to[0] = from[0]; to[1] = from[1];
|
||||
}
|
||||
|
||||
// The long operations depend on compiler support for "long long" on x86
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongAdd(jlong op1, jlong op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongAnd(jlong op1, jlong op2) {
|
||||
return op1 & op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongDiv(jlong op1, jlong op2) {
|
||||
// QQQ what about check and throw...
|
||||
return op1 / op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongMul(jlong op1, jlong op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongOr(jlong op1, jlong op2) {
|
||||
return op1 | op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongSub(jlong op1, jlong op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongXor(jlong op1, jlong op2) {
|
||||
return op1 ^ op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongRem(jlong op1, jlong op2) {
|
||||
return op1 % op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongUshr(jlong op1, jint op2) {
|
||||
// CVM did this 0x3f mask, is the really needed??? QQQ
|
||||
return ((unsigned long long) op1) >> (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongShr(jlong op1, jint op2) {
|
||||
return op1 >> (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongShl(jlong op1, jint op2) {
|
||||
return op1 << (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongNeg(jlong op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongNot(jlong op) {
|
||||
return ~op;
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLtz(jlong op) {
|
||||
return (op <= 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGez(jlong op) {
|
||||
return (op >= 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongEqz(jlong op) {
|
||||
return (op == 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongEq(jlong op1, jlong op2) {
|
||||
return (op1 == op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongNe(jlong op1, jlong op2) {
|
||||
return (op1 != op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGe(jlong op1, jlong op2) {
|
||||
return (op1 >= op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLe(jlong op1, jlong op2) {
|
||||
return (op1 <= op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLt(jlong op1, jlong op2) {
|
||||
return (op1 < op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGt(jlong op1, jlong op2) {
|
||||
return (op1 > op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongCompare(jlong op1, jlong op2) {
|
||||
return (VMlongLt(op1, op2) ? -1 : VMlongGt(op1, op2) ? 1 : 0);
|
||||
}
|
||||
|
||||
// Long conversions
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMlong2Double(jlong val) {
|
||||
return (jdouble) val;
|
||||
}
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMlong2Float(jlong val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMlong2Int(jlong val) {
|
||||
return (jint) val;
|
||||
}
|
||||
|
||||
// Double Arithmetic
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleAdd(jdouble op1, jdouble op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleDiv(jdouble op1, jdouble op2) {
|
||||
// Divide by zero... QQQ
|
||||
return op1 / op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleMul(jdouble op1, jdouble op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleNeg(jdouble op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleRem(jdouble op1, jdouble op2) {
|
||||
return fmod(op1, op2);
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleSub(jdouble op1, jdouble op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMdoubleCompare(jdouble op1, jdouble op2, int32_t direction) {
|
||||
return ( op1 < op2 ? -1 :
|
||||
op1 > op2 ? 1 :
|
||||
op1 == op2 ? 0 :
|
||||
(direction == -1 || direction == 1) ? direction : 0);
|
||||
}
|
||||
|
||||
// Double Conversions
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMdouble2Float(jdouble val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
// Float Conversions
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMfloat2Double(jfloat op) {
|
||||
return (jdouble) op;
|
||||
}
|
||||
|
||||
// Integer Arithmetic
|
||||
|
||||
inline jint BytecodeInterpreter::VMintAdd(jint op1, jint op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintAnd(jint op1, jint op2) {
|
||||
return op1 & op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) {
|
||||
/* it's possible we could catch this special case implicitly */
|
||||
if ((juint)op1 == 0x80000000 && op2 == -1) return op1;
|
||||
else return op1 / op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintMul(jint op1, jint op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintNeg(jint op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintOr(jint op1, jint op2) {
|
||||
return op1 | op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) {
|
||||
/* it's possible we could catch this special case implicitly */
|
||||
if ((juint)op1 == 0x80000000 && op2 == -1) return 0;
|
||||
else return op1 % op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintShl(jint op1, jint op2) {
|
||||
return op1 << op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintShr(jint op1, jint op2) {
|
||||
return op1 >> (op2 & 0x1f);
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintSub(jint op1, jint op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintUshr(jint op1, jint op2) {
|
||||
return ((juint) op1) >> (op2 & 0x1f);
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintXor(jint op1, jint op2) {
|
||||
return op1 ^ op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMint2Double(jint val) {
|
||||
return (jdouble) val;
|
||||
}
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMint2Float(jint val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMint2Long(jint val) {
|
||||
return (jlong) val;
|
||||
}
|
||||
|
||||
inline jchar BytecodeInterpreter::VMint2Char(jint val) {
|
||||
return (jchar) val;
|
||||
}
|
||||
|
||||
inline jshort BytecodeInterpreter::VMint2Short(jint val) {
|
||||
return (jshort) val;
|
||||
}
|
||||
|
||||
inline jbyte BytecodeInterpreter::VMint2Byte(jint val) {
|
||||
return (jbyte) val;
|
||||
}
|
||||
|
||||
#endif // CPU_AARCH64_VM_BYTECODEINTERPRETER_AARCH64_INLINE_HPP
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -40,11 +40,7 @@ define_pd_global(bool, InlineIntrinsics, true);
|
||||
define_pd_global(bool, PreferInterpreterNativeStubs, false);
|
||||
define_pd_global(bool, ProfileTraps, true);
|
||||
define_pd_global(bool, UseOnStackReplacement, true);
|
||||
#ifdef CC_INTERP
|
||||
define_pd_global(bool, ProfileInterpreter, false);
|
||||
#else
|
||||
define_pd_global(bool, ProfileInterpreter, true);
|
||||
#endif // CC_INTERP
|
||||
define_pd_global(bool, TieredCompilation, trueInTiered);
|
||||
define_pd_global(intx, CompileThreshold, 10000);
|
||||
define_pd_global(intx, BackEdgeThreshold, 100000);
|
||||
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_AARCH64_VM_CPPINTERPRETERGENERATOR_AARCH64_HPP
|
||||
#define CPU_AARCH64_VM_CPPINTERPRETERGENERATOR_AARCH64_HPP
|
||||
|
||||
protected:
|
||||
|
||||
void generate_more_monitors();
|
||||
void generate_deopt_handling();
|
||||
void lock_method(void);
|
||||
|
||||
#endif // CPU_AARCH64_VM_CPPINTERPRETERGENERATOR_AARCH64_HPP
|
@ -314,27 +314,6 @@ intptr_t* frame::entry_frame_argument_at(int offset) const {
|
||||
}
|
||||
|
||||
// sender_sp
|
||||
#ifdef CC_INTERP
|
||||
intptr_t* frame::interpreter_frame_sender_sp() const {
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
// QQQ why does this specialize method exist if frame::sender_sp() does same thing?
|
||||
// seems odd and if we always know interpreted vs. non then sender_sp() is really
|
||||
// doing too much work.
|
||||
return get_interpreterState()->sender_sp();
|
||||
}
|
||||
|
||||
// monitor elements
|
||||
|
||||
BasicObjectLock* frame::interpreter_frame_monitor_begin() const {
|
||||
return get_interpreterState()->monitor_base();
|
||||
}
|
||||
|
||||
BasicObjectLock* frame::interpreter_frame_monitor_end() const {
|
||||
return (BasicObjectLock*) get_interpreterState()->stack_base();
|
||||
}
|
||||
|
||||
#else // CC_INTERP
|
||||
|
||||
intptr_t* frame::interpreter_frame_sender_sp() const {
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
return (intptr_t*) at(interpreter_frame_sender_sp_offset);
|
||||
@ -368,7 +347,6 @@ void frame::interpreter_frame_set_monitor_end(BasicObjectLock* value) {
|
||||
void frame::interpreter_frame_set_last_sp(intptr_t* sp) {
|
||||
*((intptr_t**)addr_at(interpreter_frame_last_sp_offset)) = sp;
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
||||
frame frame::sender_for_entry_frame(RegisterMap* map) const {
|
||||
assert(map != NULL, "map must be set");
|
||||
@ -528,9 +506,6 @@ frame frame::sender(RegisterMap* map) const {
|
||||
}
|
||||
|
||||
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
// QQQ
|
||||
#ifdef CC_INTERP
|
||||
#else
|
||||
assert(is_interpreted_frame(), "Not an interpreted frame");
|
||||
// These are reasonable sanity checks
|
||||
if (fp() == 0 || (intptr_t(fp()) & (wordSize-1)) != 0) {
|
||||
@ -584,17 +559,10 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
if (locals > thread->stack_base() || locals < (address) fp()) return false;
|
||||
|
||||
// We'd have to be pretty unlucky to be mislead at this point
|
||||
|
||||
#endif // CC_INTERP
|
||||
return true;
|
||||
}
|
||||
|
||||
BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) {
|
||||
#ifdef CC_INTERP
|
||||
// Needed for JVMTI. The result should always be in the
|
||||
// interpreterState object
|
||||
interpreterState istate = get_interpreterState();
|
||||
#endif // CC_INTERP
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
Method* method = interpreter_frame_method();
|
||||
BasicType type = method->result_type();
|
||||
@ -620,11 +588,7 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result)
|
||||
case T_ARRAY : {
|
||||
oop obj;
|
||||
if (method->is_native()) {
|
||||
#ifdef CC_INTERP
|
||||
obj = istate->_oop_temp;
|
||||
#else
|
||||
obj = cast_to_oop(at(interpreter_frame_oop_temp_offset));
|
||||
#endif // CC_INTERP
|
||||
} else {
|
||||
oop* obj_p = (oop*)tos_addr;
|
||||
obj = (obj_p == NULL) ? (oop)NULL : *obj_p;
|
||||
|
@ -63,44 +63,6 @@
|
||||
// <- sender sp
|
||||
// ------------------------------ Asm interpreter ----------------------------------------
|
||||
|
||||
// ------------------------------ C++ interpreter ----------------------------------------
|
||||
//
|
||||
// Layout of C++ interpreter frame: (While executing in BytecodeInterpreter::run)
|
||||
//
|
||||
// <- SP (current esp/rsp)
|
||||
// [local variables ] BytecodeInterpreter::run local variables
|
||||
// ... BytecodeInterpreter::run local variables
|
||||
// [local variables ] BytecodeInterpreter::run local variables
|
||||
// [old frame pointer ] fp [ BytecodeInterpreter::run's ebp/rbp ]
|
||||
// [return pc ] (return to frame manager)
|
||||
// [interpreter_state* ] (arg to BytecodeInterpreter::run) --------------
|
||||
// [expression stack ] <- last_Java_sp |
|
||||
// [... ] * <- interpreter_state.stack |
|
||||
// [expression stack ] * <- interpreter_state.stack_base |
|
||||
// [monitors ] \ |
|
||||
// ... | monitor block size |
|
||||
// [monitors ] / <- interpreter_state.monitor_base |
|
||||
// [struct interpretState ] <-----------------------------------------|
|
||||
// [return pc ] (return to callee of frame manager [1]
|
||||
// [locals and parameters ]
|
||||
// <- sender sp
|
||||
|
||||
// [1] When the c++ interpreter calls a new method it returns to the frame
|
||||
// manager which allocates a new frame on the stack. In that case there
|
||||
// is no real callee of this newly allocated frame. The frame manager is
|
||||
// aware of the additional frame(s) and will pop them as nested calls
|
||||
// complete. Howevers tTo make it look good in the debugger the frame
|
||||
// manager actually installs a dummy pc pointing to RecursiveInterpreterActivation
|
||||
// with a fake interpreter_state* parameter to make it easy to debug
|
||||
// nested calls.
|
||||
|
||||
// Note that contrary to the layout for the assembly interpreter the
|
||||
// expression stack allocated for the C++ interpreter is full sized.
|
||||
// However this is not as bad as it seems as the interpreter frame_manager
|
||||
// will truncate the unused space on succesive method calls.
|
||||
//
|
||||
// ------------------------------ C++ interpreter ----------------------------------------
|
||||
|
||||
public:
|
||||
enum {
|
||||
pc_return_offset = 0,
|
||||
@ -109,8 +71,6 @@
|
||||
return_addr_offset = 1,
|
||||
sender_sp_offset = 2,
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// Interpreter frames
|
||||
interpreter_frame_oop_temp_offset = 3, // for native calls only
|
||||
|
||||
@ -127,8 +87,6 @@
|
||||
interpreter_frame_monitor_block_top_offset = interpreter_frame_initial_sp_offset,
|
||||
interpreter_frame_monitor_block_bottom_offset = interpreter_frame_initial_sp_offset,
|
||||
|
||||
#endif // CC_INTERP
|
||||
|
||||
// Entry frames
|
||||
// n.b. these values are determined by the layout defined in
|
||||
// stubGenerator for the Java call stub
|
||||
@ -193,13 +151,7 @@
|
||||
// helper to update a map with callee-saved RBP
|
||||
static void update_map_with_saved_link(RegisterMap* map, intptr_t** link_addr);
|
||||
|
||||
#ifndef CC_INTERP
|
||||
// deoptimization support
|
||||
void interpreter_frame_set_last_sp(intptr_t* sp);
|
||||
#endif // CC_INTERP
|
||||
|
||||
#ifdef CC_INTERP
|
||||
inline interpreterState get_interpreterState() const;
|
||||
#endif // CC_INTERP
|
||||
|
||||
#endif // CPU_AARCH64_VM_FRAME_AARCH64_HPP
|
||||
|
@ -157,59 +157,6 @@ inline intptr_t* frame::unextended_sp() const { return _unextended_sp; }
|
||||
inline address* frame::sender_pc_addr() const { return (address*) addr_at( return_addr_offset); }
|
||||
inline address frame::sender_pc() const { return *sender_pc_addr(); }
|
||||
|
||||
#ifdef CC_INTERP
|
||||
|
||||
inline interpreterState frame::get_interpreterState() const {
|
||||
return ((interpreterState)addr_at( -((int)sizeof(BytecodeInterpreter))/wordSize ));
|
||||
}
|
||||
|
||||
inline intptr_t* frame::sender_sp() const {
|
||||
// Hmm this seems awfully expensive QQQ, is this really called with interpreted frames?
|
||||
if (is_interpreted_frame()) {
|
||||
assert(false, "should never happen");
|
||||
return get_interpreterState()->sender_sp();
|
||||
} else {
|
||||
return addr_at(sender_sp_offset);
|
||||
}
|
||||
}
|
||||
|
||||
inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return &(get_interpreterState()->_locals);
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_bcx_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return (intptr_t*) &(get_interpreterState()->_bcp);
|
||||
}
|
||||
|
||||
|
||||
// Constant pool cache
|
||||
|
||||
inline constantPoolCacheOop* frame::interpreter_frame_cache_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return &(get_interpreterState()->_constants);
|
||||
}
|
||||
|
||||
// Method
|
||||
|
||||
inline methodOop* frame::interpreter_frame_method_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return &(get_interpreterState()->_method);
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_mdx_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return (intptr_t*) &(get_interpreterState()->_mdx);
|
||||
}
|
||||
|
||||
// top of expression stack
|
||||
inline intptr_t* frame::interpreter_frame_tos_address() const {
|
||||
assert(is_interpreted_frame(), "wrong frame type");
|
||||
return get_interpreterState()->_stack + 1;
|
||||
}
|
||||
|
||||
#else /* asm interpreter */
|
||||
inline intptr_t* frame::sender_sp() const { return addr_at( sender_sp_offset); }
|
||||
|
||||
inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
@ -259,8 +206,6 @@ inline oop* frame::interpreter_frame_temp_oop_addr() const {
|
||||
return (oop *)(fp() + interpreter_frame_oop_temp_offset);
|
||||
}
|
||||
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
inline int frame::pd_oop_map_offset_adjustment() const {
|
||||
return 0;
|
||||
}
|
||||
|
@ -47,8 +47,6 @@ void InterpreterMacroAssembler::jump_to_entry(address entry) {
|
||||
b(entry);
|
||||
}
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
void InterpreterMacroAssembler::check_and_handle_popframe(Register java_thread) {
|
||||
if (JvmtiExport::can_pop_frame()) {
|
||||
Label L;
|
||||
@ -595,8 +593,6 @@ void InterpreterMacroAssembler::remove_activation(
|
||||
andr(sp, esp, -16);
|
||||
}
|
||||
|
||||
#endif // C_INTERP
|
||||
|
||||
// Lock object
|
||||
//
|
||||
// Args:
|
||||
@ -758,8 +754,6 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
void InterpreterMacroAssembler::test_method_data_pointer(Register mdp,
|
||||
Label& zero_continue) {
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
@ -1345,7 +1339,6 @@ void InterpreterMacroAssembler::verify_oop(Register reg, TosState state) {
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) { ; }
|
||||
#endif // !CC_INTERP
|
||||
|
||||
|
||||
void InterpreterMacroAssembler::notify_method_entry() {
|
||||
@ -1392,24 +1385,23 @@ void InterpreterMacroAssembler::notify_method_exit(
|
||||
// is changed then the interpreter_frame_result implementation will
|
||||
// need to be updated too.
|
||||
|
||||
// For c++ interpreter the result is always stored at a known location in the frame
|
||||
// template interpreter will leave it on the top of the stack.
|
||||
NOT_CC_INTERP(push(state);)
|
||||
// template interpreter will leave the result on the top of the stack.
|
||||
push(state);
|
||||
ldrw(r3, Address(rthread, JavaThread::interp_only_mode_offset()));
|
||||
cbz(r3, L);
|
||||
call_VM(noreg,
|
||||
CAST_FROM_FN_PTR(address, InterpreterRuntime::post_method_exit));
|
||||
bind(L);
|
||||
NOT_CC_INTERP(pop(state));
|
||||
pop(state);
|
||||
}
|
||||
|
||||
{
|
||||
SkipIfEqual skip(this, &DTraceMethodProbes, false);
|
||||
NOT_CC_INTERP(push(state));
|
||||
push(state);
|
||||
get_method(c_rarg1);
|
||||
call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit),
|
||||
rthread, c_rarg1);
|
||||
NOT_CC_INTERP(pop(state));
|
||||
pop(state);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -35,7 +35,6 @@
|
||||
|
||||
|
||||
class InterpreterMacroAssembler: public MacroAssembler {
|
||||
#ifndef CC_INTERP
|
||||
protected:
|
||||
|
||||
protected:
|
||||
@ -59,7 +58,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
|
||||
// base routine for all dispatches
|
||||
void dispatch_base(TosState state, address* table, bool verifyoop = true);
|
||||
#endif // CC_INTERP
|
||||
|
||||
public:
|
||||
InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code) {}
|
||||
@ -68,15 +66,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
|
||||
void jump_to_entry(address entry);
|
||||
|
||||
#ifdef CC_INTERP
|
||||
void save_bcp() { /* not needed in c++ interpreter and harmless */ }
|
||||
void restore_bcp() { /* not needed in c++ interpreter and harmless */ }
|
||||
|
||||
// Helpers for runtime call arguments/results
|
||||
void get_method(Register reg);
|
||||
|
||||
#else
|
||||
|
||||
// Interpreter-specific registers
|
||||
void save_bcp() {
|
||||
str(rbcp, Address(rfp, frame::interpreter_frame_bcp_offset * wordSize));
|
||||
@ -202,7 +191,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
bool throw_monitor_exception = true,
|
||||
bool install_monitor_exception = true,
|
||||
bool notify_jvmdi = true);
|
||||
#endif // CC_INTERP
|
||||
|
||||
// FIXME: Give us a valid frame at a null check.
|
||||
virtual void null_check(Register reg, int offset = -1) {
|
||||
@ -220,8 +208,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
void lock_object (Register lock_reg);
|
||||
void unlock_object(Register lock_reg);
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// Interpreter profiling operations
|
||||
void set_method_data_pointer_for_bcp();
|
||||
void test_method_data_pointer(Register mdp, Label& zero_continue);
|
||||
@ -280,8 +266,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
// only if +VerifyFPU && (state == ftos || state == dtos)
|
||||
void verify_FPU(int stack_depth, TosState state = ftos);
|
||||
|
||||
#endif // !CC_INTERP
|
||||
|
||||
typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
|
||||
|
||||
// support for jvmti/dtrace
|
||||
|
@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_AARCH64_VM_INTERPRETERGENERATOR_AARCH64_HPP
|
||||
#define CPU_AARCH64_VM_INTERPRETERGENERATOR_AARCH64_HPP
|
||||
|
||||
|
||||
// Generation of Interpreter
|
||||
//
|
||||
friend class AbstractInterpreterGenerator;
|
||||
|
||||
protected:
|
||||
|
||||
void bang_stack_shadow_pages(bool native_call);
|
||||
|
||||
private:
|
||||
|
||||
address generate_normal_entry(bool synchronized);
|
||||
address generate_native_entry(bool synchronized);
|
||||
address generate_abstract_entry(void);
|
||||
address generate_math_entry(AbstractInterpreter::MethodKind kind);
|
||||
address generate_accessor_entry(void) { return NULL; }
|
||||
address generate_empty_entry(void) { return NULL; }
|
||||
void generate_transcendental_entry(AbstractInterpreter::MethodKind kind, int fpargs);
|
||||
address generate_Reference_get_entry();
|
||||
address generate_CRC32_update_entry();
|
||||
address generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind);
|
||||
address generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) { return NULL; }
|
||||
void generate_stack_overflow_check(void);
|
||||
|
||||
void generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue);
|
||||
void generate_counter_overflow(Label* do_continue);
|
||||
|
||||
#endif // CPU_AARCH64_VM_INTERPRETERGENERATOR_AARCH64_HPP
|
@ -27,9 +27,9 @@
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
@ -123,7 +123,7 @@ address AbstractInterpreterGenerator::generate_slow_signature_handler() {
|
||||
// Various method entries
|
||||
//
|
||||
|
||||
address InterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) {
|
||||
address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) {
|
||||
// rmethod: Method*
|
||||
// r13: sender sp
|
||||
// esp: args
|
||||
@ -202,7 +202,7 @@ address InterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKin
|
||||
// static jdouble dexp(jdouble x);
|
||||
// static jdouble dpow(jdouble x, jdouble y);
|
||||
|
||||
void InterpreterGenerator::generate_transcendental_entry(AbstractInterpreter::MethodKind kind, int fpargs) {
|
||||
void TemplateInterpreterGenerator::generate_transcendental_entry(AbstractInterpreter::MethodKind kind, int fpargs) {
|
||||
address fn;
|
||||
switch (kind) {
|
||||
case Interpreter::java_lang_math_sin :
|
||||
@ -237,7 +237,7 @@ void InterpreterGenerator::generate_transcendental_entry(AbstractInterpreter::Me
|
||||
|
||||
// Abstract method entry
|
||||
// Attempt to execute abstract method. Throw exception
|
||||
address InterpreterGenerator::generate_abstract_entry(void) {
|
||||
address TemplateInterpreterGenerator::generate_abstract_entry(void) {
|
||||
// rmethod: Method*
|
||||
// r13: sender SP
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_AARCH64_VM_INTERPRETER_AARCH64_HPP
|
||||
#define CPU_AARCH64_VM_INTERPRETER_AARCH64_HPP
|
||||
|
||||
public:
|
||||
|
||||
// Offset from rsp (which points to the last stack element)
|
||||
static int expr_offset_in_bytes(int i) { return stackElementSize * i; }
|
||||
|
||||
// Stack index relative to tos (which points at value)
|
||||
static int expr_index_at(int i) { return stackElementWords * i; }
|
||||
|
||||
// Already negated by c++ interpreter
|
||||
static int local_index_at(int i) {
|
||||
assert(i <= 0, "local direction already negated");
|
||||
return stackElementWords * i;
|
||||
}
|
||||
|
||||
#endif // CPU_AARCH64_VM_INTERPRETER_AARCH64_HPP
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -47,20 +47,13 @@ class MacroAssembler: public Assembler {
|
||||
// This is the base routine called by the different versions of call_VM_leaf. The interpreter
|
||||
// may customize this version by overriding it for its purposes (e.g., to save/restore
|
||||
// additional registers when doing a VM call).
|
||||
#ifdef CC_INTERP
|
||||
// c++ interpreter never wants to use interp_masm version of call_VM
|
||||
#define VIRTUAL
|
||||
#else
|
||||
#define VIRTUAL virtual
|
||||
#endif
|
||||
|
||||
VIRTUAL void call_VM_leaf_base(
|
||||
virtual void call_VM_leaf_base(
|
||||
address entry_point, // the entry point
|
||||
int number_of_arguments, // the number of arguments to pop after the call
|
||||
Label *retaddr = NULL
|
||||
);
|
||||
|
||||
VIRTUAL void call_VM_leaf_base(
|
||||
virtual void call_VM_leaf_base(
|
||||
address entry_point, // the entry point
|
||||
int number_of_arguments, // the number of arguments to pop after the call
|
||||
Label &retaddr) {
|
||||
@ -75,7 +68,7 @@ class MacroAssembler: public Assembler {
|
||||
// returns the register which contains the thread upon return. If a thread register has been
|
||||
// specified, the return value will correspond to that register. If no last_java_sp is specified
|
||||
// (noreg) than rsp will be used instead.
|
||||
VIRTUAL void call_VM_base( // returns the register containing the thread upon return
|
||||
virtual void call_VM_base( // returns the register containing the thread upon return
|
||||
Register oop_result, // where an oop-result ends up if any; use noreg otherwise
|
||||
Register java_thread, // the thread if computed before ; use noreg otherwise
|
||||
Register last_java_sp, // to set up last_Java_frame in stubs; use noreg otherwise
|
||||
@ -1004,8 +997,6 @@ public:
|
||||
Register table0, Register table1, Register table2, Register table3,
|
||||
Register tmp, Register tmp2, Register tmp3);
|
||||
|
||||
#undef VIRTUAL
|
||||
|
||||
// Stack push and pop individual 64 bit registers
|
||||
void push(Register src);
|
||||
void pop(Register dst);
|
||||
|
@ -27,9 +27,9 @@
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "interpreter/bytecodeTracer.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
@ -59,8 +59,6 @@
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern "C" void entry(CodeBuffer*);
|
||||
@ -304,7 +302,7 @@ address TemplateInterpreterGenerator::generate_safept_entry_for(
|
||||
//
|
||||
// rmethod: method
|
||||
//
|
||||
void InterpreterGenerator::generate_counter_incr(
|
||||
void TemplateInterpreterGenerator::generate_counter_incr(
|
||||
Label* overflow,
|
||||
Label* profile_method,
|
||||
Label* profile_method_continue) {
|
||||
@ -382,7 +380,7 @@ void InterpreterGenerator::generate_counter_incr(
|
||||
}
|
||||
}
|
||||
|
||||
void InterpreterGenerator::generate_counter_overflow(Label* do_continue) {
|
||||
void TemplateInterpreterGenerator::generate_counter_overflow(Label& do_continue) {
|
||||
|
||||
// Asm interpreter on entry
|
||||
// On return (i.e. jump to entry_point) [ back to invocation of interpreter ]
|
||||
@ -401,7 +399,7 @@ void InterpreterGenerator::generate_counter_overflow(Label* do_continue) {
|
||||
InterpreterRuntime::frequency_counter_overflow),
|
||||
c_rarg1);
|
||||
|
||||
__ b(*do_continue);
|
||||
__ b(do_continue);
|
||||
}
|
||||
|
||||
// See if we've got enough room on the stack for locals plus overhead.
|
||||
@ -418,7 +416,7 @@ void InterpreterGenerator::generate_counter_overflow(Label* do_continue) {
|
||||
//
|
||||
// Kills:
|
||||
// r0
|
||||
void InterpreterGenerator::generate_stack_overflow_check(void) {
|
||||
void TemplateInterpreterGenerator::generate_stack_overflow_check(void) {
|
||||
|
||||
// monitor entry size: see picture of stack set
|
||||
// (generate_method_entry) and frame_amd64.hpp
|
||||
@ -634,7 +632,7 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
|
||||
//
|
||||
|
||||
// Method entry for java.lang.ref.Reference.get.
|
||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
address TemplateInterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
#if INCLUDE_ALL_GCS
|
||||
// Code: _aload_0, _getfield, _areturn
|
||||
// parameter size = 1
|
||||
@ -712,7 +710,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
* Method entry for static native methods:
|
||||
* int java.util.zip.CRC32.update(int crc, int b)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
address TemplateInterpreterGenerator::generate_CRC32_update_entry() {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
|
||||
@ -766,7 +764,7 @@ address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
* int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int len)
|
||||
* int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
|
||||
@ -821,7 +819,12 @@ address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpret
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void InterpreterGenerator::bang_stack_shadow_pages(bool native_call) {
|
||||
// Not supported
|
||||
address TemplateInterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void TemplateInterpreterGenerator::bang_stack_shadow_pages(bool native_call) {
|
||||
// Bang each page in the shadow zone. We can't assume it's been done for
|
||||
// an interpreter frame with greater than a page of locals, so each page
|
||||
// needs to be checked. Only true for non-native.
|
||||
@ -840,7 +843,7 @@ void InterpreterGenerator::bang_stack_shadow_pages(bool native_call) {
|
||||
// Interpreter stub for calling a native method. (asm interpreter)
|
||||
// This sets up a somewhat different looking stack for calling the
|
||||
// native method than the typical interpreter frame setup.
|
||||
address InterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
// determine code generation flags
|
||||
bool inc_counter = UseCompiler || CountCompiledCalls || LogTouchedMethods;
|
||||
|
||||
@ -1269,7 +1272,7 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
if (inc_counter) {
|
||||
// Handle overflow of counter and compile method
|
||||
__ bind(invocation_counter_overflow);
|
||||
generate_counter_overflow(&continue_after_compile);
|
||||
generate_counter_overflow(continue_after_compile);
|
||||
}
|
||||
|
||||
return entry_point;
|
||||
@ -1278,7 +1281,7 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
//
|
||||
// Generic interpreted method entry to (asm) interpreter
|
||||
//
|
||||
address InterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
// determine code generation flags
|
||||
bool inc_counter = UseCompiler || CountCompiledCalls || LogTouchedMethods;
|
||||
|
||||
@ -1440,7 +1443,7 @@ address InterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
}
|
||||
// Handle overflow of counter and compile method
|
||||
__ bind(invocation_counter_overflow);
|
||||
generate_counter_overflow(&continue_after_compile);
|
||||
generate_counter_overflow(continue_after_compile);
|
||||
}
|
||||
|
||||
return entry_point;
|
||||
@ -1725,17 +1728,6 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
|
||||
generate_and_dispatch(t);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Generation of individual instructions
|
||||
|
||||
// helpers for generate_and_dispatch
|
||||
|
||||
|
||||
InterpreterGenerator::InterpreterGenerator(StubQueue* code)
|
||||
: TemplateInterpreterGenerator(code) {
|
||||
generate_all(); // down here so it can be "virtual"
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Non-product code
|
||||
@ -1923,4 +1915,3 @@ extern "C" {
|
||||
|
||||
#endif // BUILTIN_SIM
|
||||
#endif // !PRODUCT
|
||||
#endif // ! CC_INTERP
|
||||
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_AARCH64_VM_TEMPLATEINTERPRETERGENERATOR_AARCH64_HPP
|
||||
#define CPU_AARCH64_VM_TEMPLATEINTERPRETERGENERATOR_AARCH64_HPP
|
||||
|
||||
protected:
|
||||
|
||||
void generate_fixed_frame(bool native_call);
|
||||
|
||||
// address generate_asm_interpreter_entry(bool synchronized);
|
||||
|
||||
#endif // CPU_AARCH64_VM_TEMPLATEINTERPRETERGENERATOR_AARCH64_HPP
|
@ -31,6 +31,12 @@
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
// Size of interpreter code. Increase if too small. Interpreter will
|
||||
// fail with a guarantee ("not enough space for interpreter generation");
|
||||
// if too small.
|
||||
// Run with +PrintInterpreter to get the VM to print out the size.
|
||||
// Max size with JVMTI
|
||||
int TemplateInterpreter::InterpreterCodeSize = 200 * 1024;
|
||||
|
||||
int AbstractInterpreter::BasicType_as_index(BasicType type) {
|
||||
int i = 0;
|
||||
@ -97,7 +103,7 @@ int AbstractInterpreter::size_activation(int max_stack,
|
||||
int callee_locals,
|
||||
bool is_top_frame) {
|
||||
// Note: This calculation must exactly parallel the frame setup
|
||||
// in InterpreterGenerator::generate_method_entry.
|
||||
// in TemplateInterpreterGenerator::generate_method_entry.
|
||||
|
||||
// fixed size of an interpreter frame:
|
||||
int overhead = frame::sender_sp_offset -
|
||||
|
@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_AARCH64_VM_TEMPLATEINTERPRETER_AARCH64_HPP
|
||||
#define CPU_AARCH64_VM_TEMPLATEINTERPRETER_AARCH64_HPP
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Size of interpreter code. Increase if too small. Interpreter will
|
||||
// fail with a guarantee ("not enough space for interpreter generation");
|
||||
// if too small.
|
||||
// Run with +PrintInterpreter to get the VM to print out the size.
|
||||
// Max size with JVMTI
|
||||
const static int InterpreterCodeSize = 200 * 1024;
|
||||
|
||||
#endif // CPU_AARCH64_VM_TEMPLATEINTERPRETER_AARCH64_HPP
|
@ -39,8 +39,6 @@
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
// Platform-dependent initialization
|
||||
@ -3795,4 +3793,3 @@ void TemplateTable::multianewarray() {
|
||||
__ load_unsigned_byte(r1, at_bcp(3));
|
||||
__ lea(esp, Address(esp, r1, Address::uxtw(3)));
|
||||
}
|
||||
#endif // !CC_INTERP
|
||||
|
@ -27,7 +27,7 @@
|
||||
#define CPU_PPC_VM_GLOBALDEFINITIONS_PPC_HPP
|
||||
|
||||
#ifdef CC_INTERP
|
||||
#error "CC_INTERP no more supported. Removed in change 8145117."
|
||||
#error "CC_INTERP is no longer supported. Removed in change 8145117."
|
||||
#endif
|
||||
|
||||
// Size of PPC Instructions
|
||||
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2015 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_PPC_VM_INTERPRETERGENERATOR_PPC_HPP
|
||||
#define CPU_PPC_VM_INTERPRETERGENERATOR_PPC_HPP
|
||||
|
||||
friend class AbstractInterpreterGenerator;
|
||||
|
||||
private:
|
||||
|
||||
address generate_abstract_entry(void);
|
||||
address generate_accessor_entry(void) { return NULL; }
|
||||
address generate_empty_entry(void) { return NULL; }
|
||||
address generate_Reference_get_entry(void);
|
||||
|
||||
address generate_CRC32_update_entry();
|
||||
address generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind);
|
||||
address generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) { return NULL; }
|
||||
|
||||
#endif // CPU_PPC_VM_INTERPRETERGENERATOR_PPC_HPP
|
@ -27,9 +27,9 @@
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
@ -416,7 +416,7 @@ address AbstractInterpreterGenerator::generate_result_handler_for(BasicType type
|
||||
|
||||
// Abstract method entry.
|
||||
//
|
||||
address InterpreterGenerator::generate_abstract_entry(void) {
|
||||
address TemplateInterpreterGenerator::generate_abstract_entry(void) {
|
||||
address entry = __ pc();
|
||||
|
||||
//
|
||||
@ -474,7 +474,7 @@ address InterpreterGenerator::generate_abstract_entry(void) {
|
||||
// It contains a GC barrier which puts the reference into the satb buffer
|
||||
// to indicate that someone holds a strong reference to the object the
|
||||
// weak ref points to!
|
||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
address TemplateInterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
// Code: _aload_0, _getfield, _areturn
|
||||
// parameter size = 1
|
||||
//
|
||||
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2015 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_PPC_VM_INTERPRETER_PPC_HPP
|
||||
#define CPU_PPC_VM_INTERPRETER_PPC_HPP
|
||||
|
||||
public:
|
||||
|
||||
// Stack index relative to tos (which points at value).
|
||||
static int expr_index_at(int i) {
|
||||
return stackElementWords * i;
|
||||
}
|
||||
|
||||
// Already negated by c++ interpreter.
|
||||
static int local_index_at(int i) {
|
||||
assert(i <= 0, "local direction already negated");
|
||||
return stackElementWords * i;
|
||||
}
|
||||
|
||||
// The offset in bytes to access a expression stack slot
|
||||
// relative to the esp pointer.
|
||||
static int expr_offset_in_bytes(int slot) {
|
||||
return stackElementSize * slot + wordSize;
|
||||
}
|
||||
|
||||
#endif // CPU_PPC_VM_INTERPRETER_PPC_HPP
|
@ -27,9 +27,9 @@
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
@ -1245,7 +1245,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
* Method entry for static native methods:
|
||||
* int java.util.zip.CRC32.update(int crc, int b)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
address TemplateInterpreterGenerator::generate_CRC32_update_entry() {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address start = __ pc(); // Remember stub start address (is rtn value).
|
||||
Label slow_path;
|
||||
@ -1305,7 +1305,7 @@ address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
* int java.util.zip.CRC32.updateBytes( int crc, byte[] b, int off, int len)
|
||||
* int java.util.zip.CRC32.updateByteBuffer(int crc, long* buf, int off, int len)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address start = __ pc(); // Remember stub start address (is rtn value).
|
||||
Label slow_path;
|
||||
@ -1391,6 +1391,11 @@ address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpret
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Not supported
|
||||
address TemplateInterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// Exceptions
|
||||
|
||||
@ -1642,16 +1647,6 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
|
||||
generate_and_dispatch(t);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Generation of individual instructions
|
||||
|
||||
// helpers for generate_and_dispatch
|
||||
|
||||
InterpreterGenerator::InterpreterGenerator(StubQueue* code)
|
||||
: TemplateInterpreterGenerator(code) {
|
||||
generate_all(); // Down here so it can be "virtual".
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Non-product code
|
||||
|
@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2013, 2014 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_PPC_VM_TEMPLATEINTERPRETERGENERATOR_PPC_HPP
|
||||
#define CPU_PPC_VM_TEMPLATEINTERPRETERGENERATOR_PPC_HPP
|
||||
|
||||
protected:
|
||||
address generate_normal_entry(bool synchronized);
|
||||
address generate_native_entry(bool synchronized);
|
||||
address generate_math_entry(AbstractInterpreter::MethodKind kind);
|
||||
|
||||
void lock_method(Register Rflags, Register Rscratch1, Register Rscratch2, bool flags_preloaded=false);
|
||||
void unlock_method(bool check_exceptions = true);
|
||||
|
||||
void generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue);
|
||||
void generate_counter_overflow(Label& continue_entry);
|
||||
|
||||
void generate_fixed_frame(bool native_call, Register Rsize_of_parameters, Register Rsize_of_locals);
|
||||
void generate_stack_overflow_check(Register Rframe_size, Register Rscratch1);
|
||||
|
||||
#endif // CPU_PPC_VM_TEMPLATEINTERPRETERGENERATOR_PPC_HPP
|
@ -31,6 +31,12 @@
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
// Size of interpreter code. Increase if too small. Interpreter will
|
||||
// fail with a guarantee ("not enough space for interpreter generation");
|
||||
// if too small.
|
||||
// Run with +PrintInterpreter to get the VM to print out the size.
|
||||
// Max size with JVMTI
|
||||
int TemplateInterpreter::InterpreterCodeSize = 230*K;
|
||||
|
||||
int AbstractInterpreter::BasicType_as_index(BasicType type) {
|
||||
int i = 0;
|
||||
@ -79,7 +85,7 @@ int AbstractInterpreter::size_activation(int max_stack,
|
||||
int callee_locals,
|
||||
bool is_top_frame) {
|
||||
// Note: This calculation must exactly parallel the frame setup
|
||||
// in InterpreterGenerator::generate_fixed_frame.
|
||||
// in TemplateInterpreterGenerator::generate_fixed_frame.
|
||||
assert(Interpreter::stackElementWords == 1, "sanity");
|
||||
const int max_alignment_space = StackAlignmentInBytes / Interpreter::stackElementSize;
|
||||
const int abi_scratch = is_top_frame ? (frame::abi_reg_args_size / Interpreter::stackElementSize) :
|
||||
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2015 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_PPC_VM_TEMPLATEINTERPRETER_PPC_HPP
|
||||
#define CPU_PPC_VM_TEMPLATEINTERPRETER_PPC_HPP
|
||||
|
||||
protected:
|
||||
|
||||
// Size of interpreter code. Increase if too small. Interpreter will
|
||||
// fail with a guarantee ("not enough space for interpreter generation");
|
||||
// if too small.
|
||||
// Run with +PrintInterpreter to get the VM to print out the size.
|
||||
// Max size with JVMTI
|
||||
const static int InterpreterCodeSize = 230*K;
|
||||
|
||||
public:
|
||||
// Support abs and sqrt like in compiler.
|
||||
// For others we can use a normal (native) entry.
|
||||
static bool math_entry_available(AbstractInterpreter::MethodKind kind);
|
||||
#endif // CPU_PPC_VM_TEMPLATEINTERPRETER_PPC_HPP
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "interp_masm_sparc.hpp"
|
||||
#include "interpreter/bytecodeInterpreter.hpp"
|
||||
#include "interpreter/bytecodeInterpreter.inline.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "prims/jvmtiExport.hpp"
|
||||
#include "prims/jvmtiThreadState.hpp"
|
||||
#include "runtime/deoptimization.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
|
||||
// KILL THIS FILE
|
@ -1,104 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_SPARC_VM_BYTECODEINTERPRETER_SPARC_HPP
|
||||
#define CPU_SPARC_VM_BYTECODEINTERPRETER_SPARC_HPP
|
||||
|
||||
// Platform specific for C++ based Interpreter
|
||||
#define LOTS_OF_REGS /* Lets interpreter use plenty of registers */
|
||||
|
||||
private:
|
||||
|
||||
// save the bottom of the stack after frame manager setup. For ease of restoration after return
|
||||
// from recursive interpreter call
|
||||
intptr_t* _frame_bottom; /* saved bottom of frame manager frame */
|
||||
intptr_t* _last_Java_pc; /* pc to return to in frame manager */
|
||||
interpreterState _self_link; /* Previous interpreter state */ /* sometimes points to self??? */
|
||||
double _native_fresult; /* save result of native calls that might return floats */
|
||||
intptr_t _native_lresult; /* save result of native calls that might return handle/longs */
|
||||
public:
|
||||
|
||||
static void pd_layout_interpreterState(interpreterState istate, address last_Java_pc, intptr_t* last_Java_fp);
|
||||
|
||||
|
||||
#define SET_LAST_JAVA_FRAME()
|
||||
|
||||
#define RESET_LAST_JAVA_FRAME() THREAD->frame_anchor()->set_flags(0);
|
||||
|
||||
/*
|
||||
* Macros for accessing the stack.
|
||||
*/
|
||||
#undef STACK_INT
|
||||
#undef STACK_FLOAT
|
||||
#undef STACK_ADDR
|
||||
#undef STACK_OBJECT
|
||||
#undef STACK_DOUBLE
|
||||
#undef STACK_LONG
|
||||
// JavaStack Implementation
|
||||
|
||||
|
||||
#define GET_STACK_SLOT(offset) (*((intptr_t*) &topOfStack[-(offset)]))
|
||||
#define STACK_SLOT(offset) ((address) &topOfStack[-(offset)])
|
||||
#define STACK_ADDR(offset) (*((address *) &topOfStack[-(offset)]))
|
||||
#define STACK_INT(offset) (*((jint*) &topOfStack[-(offset)]))
|
||||
#define STACK_FLOAT(offset) (*((jfloat *) &topOfStack[-(offset)]))
|
||||
#define STACK_OBJECT(offset) (*((oop *) &topOfStack [-(offset)]))
|
||||
#define STACK_DOUBLE(offset) (((VMJavaVal64*) &topOfStack[-(offset)])->d)
|
||||
#define STACK_LONG(offset) (((VMJavaVal64 *) &topOfStack[-(offset)])->l)
|
||||
|
||||
#define SET_STACK_SLOT(value, offset) (*(intptr_t*)&topOfStack[-(offset)] = *(intptr_t*)(value))
|
||||
#define SET_STACK_ADDR(value, offset) (*((address *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_INT(value, offset) (*((jint *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_FLOAT(value, offset) (*((jfloat *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_OBJECT(value, offset) (*((oop *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_DOUBLE(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = (value))
|
||||
#define SET_STACK_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = \
|
||||
((VMJavaVal64*)(addr))->d)
|
||||
#define SET_STACK_LONG(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->l = (value))
|
||||
#define SET_STACK_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->l = \
|
||||
((VMJavaVal64*)(addr))->l)
|
||||
|
||||
#define LOCALS_SLOT(offset) ((intptr_t*)&locals[-(offset)])
|
||||
#define LOCALS_ADDR(offset) ((address)locals[-(offset)])
|
||||
#define LOCALS_INT(offset) (*((jint*)&locals[-(offset)]))
|
||||
#define LOCALS_FLOAT(offset) (*((jfloat*)&locals[-(offset)]))
|
||||
#define LOCALS_OBJECT(offset) (cast_to_oop(locals[-(offset)]))
|
||||
#define LOCALS_DOUBLE(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->d)
|
||||
#define LOCALS_LONG(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->l)
|
||||
#define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)]))
|
||||
#define LOCALS_DOUBLE_AT(offset) (((address)&locals[-((offset) + 1)]))
|
||||
|
||||
#define SET_LOCALS_SLOT(value, offset) (*(intptr_t*)&locals[-(offset)] = *(intptr_t *)(value))
|
||||
#define SET_LOCALS_ADDR(value, offset) (*((address *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_INT(value, offset) (*((jint *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_FLOAT(value, offset) (*((jfloat *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_OBJECT(value, offset) (*((oop *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_DOUBLE(value, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = (value))
|
||||
#define SET_LOCALS_LONG(value, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = (value))
|
||||
#define SET_LOCALS_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = \
|
||||
((VMJavaVal64*)(addr))->d)
|
||||
#define SET_LOCALS_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = \
|
||||
((VMJavaVal64*)(addr))->l)
|
||||
|
||||
#endif // CPU_SPARC_VM_BYTECODEINTERPRETER_SPARC_HPP
|
@ -1,338 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_SPARC_VM_BYTECODEINTERPRETER_SPARC_INLINE_HPP
|
||||
#define CPU_SPARC_VM_BYTECODEINTERPRETER_SPARC_INLINE_HPP
|
||||
|
||||
// Inline interpreter functions for sparc
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMfloatAdd(jfloat op1, jfloat op2) { return op1 + op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatSub(jfloat op1, jfloat op2) { return op1 - op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatMul(jfloat op1, jfloat op2) { return op1 * op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatDiv(jfloat op1, jfloat op2) { return op1 / op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatRem(jfloat op1, jfloat op2) { return fmod(op1, op2); }
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMfloatNeg(jfloat op) { return -op; }
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMfloatCompare(jfloat op1, jfloat op2, int32_t direction) {
|
||||
return ( op1 < op2 ? -1 :
|
||||
op1 > op2 ? 1 :
|
||||
op1 == op2 ? 0 :
|
||||
(direction == -1 || direction == 1) ? direction : 0);
|
||||
|
||||
}
|
||||
|
||||
inline void BytecodeInterpreter::VMmemCopy64(uint32_t to[2], const uint32_t from[2]) {
|
||||
// x86 can do unaligned copies but not 64bits at a time
|
||||
to[0] = from[0]; to[1] = from[1];
|
||||
}
|
||||
|
||||
// The long operations depend on compiler support for "long long" on x86
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongAdd(jlong op1, jlong op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongAnd(jlong op1, jlong op2) {
|
||||
return op1 & op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongDiv(jlong op1, jlong op2) {
|
||||
// QQQ what about check and throw...
|
||||
return op1 / op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongMul(jlong op1, jlong op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongOr(jlong op1, jlong op2) {
|
||||
return op1 | op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongSub(jlong op1, jlong op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongXor(jlong op1, jlong op2) {
|
||||
return op1 ^ op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongRem(jlong op1, jlong op2) {
|
||||
return op1 % op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongUshr(jlong op1, jint op2) {
|
||||
// CVM did this 0x3f mask, is the really needed??? QQQ
|
||||
return ((unsigned long long) op1) >> (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongShr(jlong op1, jint op2) {
|
||||
return op1 >> (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongShl(jlong op1, jint op2) {
|
||||
return op1 << (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongNeg(jlong op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongNot(jlong op) {
|
||||
return ~op;
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLtz(jlong op) {
|
||||
return (op <= 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGez(jlong op) {
|
||||
return (op >= 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongEqz(jlong op) {
|
||||
return (op == 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongEq(jlong op1, jlong op2) {
|
||||
return (op1 == op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongNe(jlong op1, jlong op2) {
|
||||
return (op1 != op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGe(jlong op1, jlong op2) {
|
||||
return (op1 >= op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLe(jlong op1, jlong op2) {
|
||||
return (op1 <= op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLt(jlong op1, jlong op2) {
|
||||
return (op1 < op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGt(jlong op1, jlong op2) {
|
||||
return (op1 > op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongCompare(jlong op1, jlong op2) {
|
||||
return (VMlongLt(op1, op2) ? -1 : VMlongGt(op1, op2) ? 1 : 0);
|
||||
}
|
||||
|
||||
// Long conversions
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMlong2Double(jlong val) {
|
||||
return (jdouble) val;
|
||||
}
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMlong2Float(jlong val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMlong2Int(jlong val) {
|
||||
return (jint) val;
|
||||
}
|
||||
|
||||
// Double Arithmetic
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleAdd(jdouble op1, jdouble op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleDiv(jdouble op1, jdouble op2) {
|
||||
// Divide by zero... QQQ
|
||||
return op1 / op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleMul(jdouble op1, jdouble op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleNeg(jdouble op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleRem(jdouble op1, jdouble op2) {
|
||||
return fmod(op1, op2);
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleSub(jdouble op1, jdouble op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMdoubleCompare(jdouble op1, jdouble op2, int32_t direction) {
|
||||
return ( op1 < op2 ? -1 :
|
||||
op1 > op2 ? 1 :
|
||||
op1 == op2 ? 0 :
|
||||
(direction == -1 || direction == 1) ? direction : 0);
|
||||
}
|
||||
|
||||
// Double Conversions
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMdouble2Float(jdouble val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
// Float Conversions
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMfloat2Double(jfloat op) {
|
||||
return (jdouble) op;
|
||||
}
|
||||
|
||||
// Integer Arithmetic
|
||||
|
||||
inline jint BytecodeInterpreter::VMintAdd(jint op1, jint op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintAnd(jint op1, jint op2) {
|
||||
return op1 & op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) {
|
||||
/* it's possible we could catch this special case implicitly */
|
||||
if (op1 == 0x80000000 && op2 == -1) return op1;
|
||||
else return op1 / op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintMul(jint op1, jint op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintNeg(jint op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintOr(jint op1, jint op2) {
|
||||
return op1 | op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) {
|
||||
/* it's possible we could catch this special case implicitly */
|
||||
if (op1 == 0x80000000 && op2 == -1) return 0;
|
||||
else return op1 % op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintShl(jint op1, jint op2) {
|
||||
return op1 << (op2 & 0x1f);
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintShr(jint op1, jint op2) {
|
||||
return op1 >> (op2 & 0x1f);
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintSub(jint op1, jint op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline juint BytecodeInterpreter::VMintUshr(jint op1, jint op2) {
|
||||
return ((juint) op1) >> (op2 & 0x1f);
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintXor(jint op1, jint op2) {
|
||||
return op1 ^ op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMint2Double(jint val) {
|
||||
return (jdouble) val;
|
||||
}
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMint2Float(jint val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMint2Long(jint val) {
|
||||
return (jlong) val;
|
||||
}
|
||||
|
||||
inline jchar BytecodeInterpreter::VMint2Char(jint val) {
|
||||
return (jchar) val;
|
||||
}
|
||||
|
||||
inline jshort BytecodeInterpreter::VMint2Short(jint val) {
|
||||
return (jshort) val;
|
||||
}
|
||||
|
||||
inline jbyte BytecodeInterpreter::VMint2Byte(jint val) {
|
||||
return (jbyte) val;
|
||||
}
|
||||
|
||||
// The implementations are platform dependent. We have to worry about alignment
|
||||
// issues on some machines which can change on the same platform depending on
|
||||
// whether it is an LP64 machine also.
|
||||
|
||||
// We know that on LP32 mode that longs/doubles are the only thing that gives
|
||||
// us alignment headaches. We also know that the worst we have is 32bit alignment
|
||||
// so thing are not really too bad.
|
||||
// (Also sparcworks compiler does the right thing for free if we don't use -arch..
|
||||
// switches. Only gcc gives us a hard time. In LP64 mode I think we have no issue
|
||||
// with alignment.
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#define ALIGN_CONVERTER /* Needs alignment converter */
|
||||
#else
|
||||
#undef ALIGN_CONVERTER /* No alignment converter */
|
||||
#endif /* _GNU_SOURCE */
|
||||
|
||||
#ifdef ALIGN_CONVERTER
|
||||
class u8_converter {
|
||||
|
||||
private:
|
||||
|
||||
public:
|
||||
static jdouble get_jdouble(address p) {
|
||||
VMJavaVal64 tmp;
|
||||
tmp.v[0] = ((uint32_t*)p)[0];
|
||||
tmp.v[1] = ((uint32_t*)p)[1];
|
||||
return tmp.d;
|
||||
}
|
||||
|
||||
static void put_jdouble(address p, jdouble d) {
|
||||
VMJavaVal64 tmp;
|
||||
tmp.d = d;
|
||||
((uint32_t*)p)[0] = tmp.v[0];
|
||||
((uint32_t*)p)[1] = tmp.v[1];
|
||||
}
|
||||
|
||||
static jlong get_jlong(address p) {
|
||||
VMJavaVal64 tmp;
|
||||
tmp.v[0] = ((uint32_t*)p)[0];
|
||||
tmp.v[1] = ((uint32_t*)p)[1];
|
||||
return tmp.l;
|
||||
}
|
||||
|
||||
static void put_jlong(address p, jlong l) {
|
||||
VMJavaVal64 tmp;
|
||||
tmp.l = l;
|
||||
((uint32_t*)p)[0] = tmp.v[0];
|
||||
((uint32_t*)p)[1] = tmp.v[1];
|
||||
}
|
||||
};
|
||||
#endif /* ALIGN_CONVERTER */
|
||||
|
||||
#endif // CPU_SPARC_VM_BYTECODEINTERPRETER_SPARC_INLINE_HPP
|
@ -37,11 +37,7 @@ define_pd_global(bool, InlineIntrinsics, false);
|
||||
define_pd_global(bool, PreferInterpreterNativeStubs, false);
|
||||
define_pd_global(bool, ProfileTraps, true);
|
||||
define_pd_global(bool, UseOnStackReplacement, true);
|
||||
#ifdef CC_INTERP
|
||||
define_pd_global(bool, ProfileInterpreter, false);
|
||||
#else
|
||||
define_pd_global(bool, ProfileInterpreter, true);
|
||||
#endif // CC_INTERP
|
||||
define_pd_global(bool, TieredCompilation, trueInTiered);
|
||||
define_pd_global(intx, CompileThreshold, 10000);
|
||||
|
||||
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_SPARC_VM_CPPINTERPRETERGENERATOR_SPARC_HPP
|
||||
#define CPU_SPARC_VM_CPPINTERPRETERGENERATOR_SPARC_HPP
|
||||
|
||||
static address frame_manager_return;
|
||||
static address frame_manager_sync_return;
|
||||
|
||||
|
||||
void generate_more_monitors();
|
||||
void generate_deopt_handling();
|
||||
void lock_method(void);
|
||||
void adjust_callers_stack(Register args);
|
||||
void generate_compute_interpreter_state(const Register state,
|
||||
const Register prev_state,
|
||||
bool native);
|
||||
|
||||
#endif // CPU_SPARC_VM_CPPINTERPRETERGENERATOR_SPARC_HPP
|
File diff suppressed because it is too large
Load Diff
@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_SPARC_VM_CPPINTERPRETER_SPARC_HPP
|
||||
#define CPU_SPARC_VM_CPPINTERPRETER_SPARC_HPP
|
||||
|
||||
// Size of interpreter code. Increase if too small. Interpreter will
|
||||
// fail with a guarantee ("not enough space for interpreter generation");
|
||||
// if too small.
|
||||
// Run with +PrintInterpreter to get the VM to print out the size.
|
||||
// Max size with JVMTI
|
||||
|
||||
// QQQ this is proably way too large for c++ interpreter
|
||||
|
||||
#ifdef _LP64
|
||||
// The sethi() instruction generates lots more instructions when shell
|
||||
// stack limit is unlimited, so that's why this is much bigger.
|
||||
const static int InterpreterCodeSize = 210 * K;
|
||||
#else
|
||||
const static int InterpreterCodeSize = 180 * K;
|
||||
#endif
|
||||
|
||||
#endif // CPU_SPARC_VM_CPPINTERPRETER_SPARC_HPP
|
@ -441,12 +441,10 @@ intptr_t* frame::interpreter_frame_sender_sp() const {
|
||||
return fp();
|
||||
}
|
||||
|
||||
#ifndef CC_INTERP
|
||||
void frame::set_interpreter_frame_sender_sp(intptr_t* sender_sp) {
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
Unimplemented();
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
||||
frame frame::sender_for_entry_frame(RegisterMap *map) const {
|
||||
assert(map != NULL, "map must be set");
|
||||
@ -600,9 +598,6 @@ bool frame::is_valid_stack_pointer(intptr_t* valid_sp, intptr_t* sp) {
|
||||
}
|
||||
|
||||
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
#ifdef CC_INTERP
|
||||
// Is there anything to do?
|
||||
#else
|
||||
assert(is_interpreted_frame(), "Not an interpreted frame");
|
||||
// These are reasonable sanity checks
|
||||
if (fp() == 0 || (intptr_t(fp()) & (2*wordSize-1)) != 0) {
|
||||
@ -654,7 +649,6 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
if (locals > thread->stack_base() || locals < (address) fp()) return false;
|
||||
|
||||
// We'd have to be pretty unlucky to be mislead at this point
|
||||
#endif /* CC_INTERP */
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -712,14 +706,8 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result)
|
||||
// Prior to notifying the runtime of the method_exit the possible result
|
||||
// value is saved to l_scratch and d_scratch.
|
||||
|
||||
#ifdef CC_INTERP
|
||||
interpreterState istate = get_interpreterState();
|
||||
intptr_t* l_scratch = (intptr_t*) &istate->_native_lresult;
|
||||
intptr_t* d_scratch = (intptr_t*) &istate->_native_fresult;
|
||||
#else /* CC_INTERP */
|
||||
intptr_t* l_scratch = fp() + interpreter_frame_l_scratch_fp_offset;
|
||||
intptr_t* d_scratch = fp() + interpreter_frame_d_scratch_fp_offset;
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
address l_addr = (address)l_scratch;
|
||||
#ifdef _LP64
|
||||
@ -731,13 +719,9 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result)
|
||||
switch (type) {
|
||||
case T_OBJECT:
|
||||
case T_ARRAY: {
|
||||
#ifdef CC_INTERP
|
||||
*oop_result = istate->_oop_temp;
|
||||
#else
|
||||
oop obj = cast_to_oop(at(interpreter_frame_oop_temp_offset));
|
||||
assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check");
|
||||
*oop_result = obj;
|
||||
#endif // CC_INTERP
|
||||
break;
|
||||
}
|
||||
|
||||
@ -797,7 +781,6 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
|
||||
}
|
||||
|
||||
if (is_interpreted_frame()) {
|
||||
#ifndef CC_INTERP
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_d_scratch_fp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_l_scratch_fp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_padding);
|
||||
@ -808,7 +791,6 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
|
||||
if ((esp >= sp()) && (esp < fp())) {
|
||||
values.describe(-1, esp, "*Lesp");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!is_compiled_frame()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -90,11 +90,6 @@
|
||||
// G5_method is set to method to call, G5_inline_cache_klass may be set,
|
||||
// parameters are put in O registers, and also extra parameters
|
||||
// must be cleverly copied from the top of stack to the outgoing param area in the frame,
|
||||
// ------------------------------ C++ interpreter ----------------------------------------
|
||||
// Layout of C++ interpreter frame:
|
||||
//
|
||||
|
||||
|
||||
|
||||
// All frames:
|
||||
|
||||
@ -211,7 +206,6 @@
|
||||
|
||||
public:
|
||||
// Asm interpreter
|
||||
#ifndef CC_INTERP
|
||||
enum interpreter_frame_vm_locals {
|
||||
// 2 words, also used to save float regs across calls to C
|
||||
interpreter_frame_d_scratch_fp_offset = -2,
|
||||
@ -228,18 +222,6 @@
|
||||
|
||||
interpreter_frame_extra_outgoing_argument_words = 2
|
||||
};
|
||||
#else
|
||||
enum interpreter_frame_vm_locals {
|
||||
// 2 words, also used to save float regs across calls to C
|
||||
interpreter_state_ptr_offset = 0, // Is in L0 (Lstate) in save area
|
||||
interpreter_frame_mirror_offset = 1, // Is in L1 (Lmirror) in save area (for native calls only)
|
||||
|
||||
// interpreter frame set-up needs to save 2 extra words in outgoing param area
|
||||
// for class and jnienv arguments for native stubs (see nativeStubGen_sparc.cpp_
|
||||
|
||||
interpreter_frame_extra_outgoing_argument_words = 2
|
||||
};
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
enum compiler_frame_fixed_locals {
|
||||
compiler_frame_vm_locals_fp_offset = -2
|
||||
@ -248,8 +230,6 @@
|
||||
private:
|
||||
ConstantPoolCache** interpreter_frame_cpoolcache_addr() const;
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// where Lmonitors is saved:
|
||||
inline BasicObjectLock** interpreter_frame_monitors_addr() const;
|
||||
inline intptr_t** interpreter_frame_esp_addr() const;
|
||||
@ -262,14 +242,6 @@
|
||||
private:
|
||||
BasicObjectLock* interpreter_frame_monitors() const;
|
||||
void interpreter_frame_set_monitors(BasicObjectLock* monitors);
|
||||
#else
|
||||
public:
|
||||
inline interpreterState get_interpreterState() const {
|
||||
return ((interpreterState)sp_at(interpreter_state_ptr_offset));
|
||||
}
|
||||
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
public:
|
||||
|
||||
#endif // CPU_SPARC_VM_FRAME_SPARC_HPP
|
||||
|
@ -91,75 +91,6 @@ inline int frame::pd_oop_map_offset_adjustment() const {
|
||||
return _sp_adjustment_by_callee * VMRegImpl::slots_per_word;
|
||||
}
|
||||
|
||||
#ifdef CC_INTERP
|
||||
inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return (intptr_t**) &istate->_locals;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_bcp_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return (intptr_t*) &istate->_bcp;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return (intptr_t*) &istate->_mdx;
|
||||
}
|
||||
|
||||
inline jint frame::interpreter_frame_expression_stack_direction() { return -1; }
|
||||
|
||||
// bottom(base) of the expression stack (highest address)
|
||||
inline intptr_t* frame::interpreter_frame_expression_stack() const {
|
||||
return (intptr_t*)interpreter_frame_monitor_end() - 1;
|
||||
}
|
||||
|
||||
// top of expression stack (lowest address)
|
||||
inline intptr_t* frame::interpreter_frame_tos_address() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return istate->_stack + 1; // Is this off by one? QQQ
|
||||
}
|
||||
|
||||
// monitor elements
|
||||
|
||||
// in keeping with Intel side: end is lower in memory than begin;
|
||||
// and beginning element is oldest element
|
||||
// Also begin is one past last monitor.
|
||||
|
||||
inline BasicObjectLock* frame::interpreter_frame_monitor_begin() const {
|
||||
return get_interpreterState()->monitor_base();
|
||||
}
|
||||
|
||||
inline BasicObjectLock* frame::interpreter_frame_monitor_end() const {
|
||||
return (BasicObjectLock*) get_interpreterState()->stack_base();
|
||||
}
|
||||
|
||||
|
||||
inline int frame::interpreter_frame_monitor_size() {
|
||||
return round_to(BasicObjectLock::size(), WordsPerLong);
|
||||
}
|
||||
|
||||
inline Method** frame::interpreter_frame_method_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return &istate->_method;
|
||||
}
|
||||
|
||||
|
||||
// Constant pool cache
|
||||
|
||||
// where LcpoolCache is saved:
|
||||
inline ConstantPoolCache** frame::interpreter_frame_cpoolcache_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return &istate->_constants; // should really use accessor
|
||||
}
|
||||
|
||||
inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return &istate->_constants;
|
||||
}
|
||||
|
||||
#else // !CC_INTERP
|
||||
|
||||
inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
return (intptr_t**) sp_addr_at( Llocals->sp_offset_in_saved_window());
|
||||
}
|
||||
@ -246,7 +177,6 @@ inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
|
||||
inline oop* frame::interpreter_frame_temp_oop_addr() const {
|
||||
return (oop *)(fp() + interpreter_frame_oop_temp_offset);
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
||||
|
||||
inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
#ifndef FAST_DISPATCH
|
||||
#define FAST_DISPATCH 1
|
||||
#endif
|
||||
@ -52,13 +51,6 @@
|
||||
const Address InterpreterMacroAssembler::l_tmp(FP, (frame::interpreter_frame_l_scratch_fp_offset * wordSize) + STACK_BIAS);
|
||||
const Address InterpreterMacroAssembler::d_tmp(FP, (frame::interpreter_frame_d_scratch_fp_offset * wordSize) + STACK_BIAS);
|
||||
|
||||
#else // CC_INTERP
|
||||
#ifndef STATE
|
||||
#define STATE(field_name) Lstate, in_bytes(byte_offset_of(BytecodeInterpreter, field_name))
|
||||
#endif // STATE
|
||||
|
||||
#endif // CC_INTERP
|
||||
|
||||
void InterpreterMacroAssembler::jump_to_entry(address entry) {
|
||||
assert(entry, "Entry must have been generated by now");
|
||||
AddressLiteral al(entry);
|
||||
@ -82,8 +74,6 @@ void InterpreterMacroAssembler::compute_extra_locals_size_in_bytes(Register args
|
||||
sll(delta, LogBytesPerWord, delta); // extra space for locals in bytes
|
||||
}
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// Dispatch code executed in the prolog of a bytecode which does not do it's
|
||||
// own dispatch. The dispatch address is computed and placed in IdispatchAddress
|
||||
void InterpreterMacroAssembler::dispatch_prolog(TosState state, int bcp_incr) {
|
||||
@ -265,10 +255,6 @@ void InterpreterMacroAssembler::super_call_VM_leaf(Register thread_cache, addres
|
||||
mov(arg_2, O1);
|
||||
MacroAssembler::call_VM_leaf_base(thread_cache, entry_point, 2);
|
||||
}
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
void InterpreterMacroAssembler::dispatch_base(TosState state, address* table) {
|
||||
assert_not_delayed();
|
||||
@ -1189,8 +1175,6 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
|
||||
#endif /* COMPILER2 */
|
||||
|
||||
}
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
|
||||
// Lock object
|
||||
//
|
||||
@ -1323,8 +1307,6 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// Get the method data pointer from the Method* and set the
|
||||
// specified register to its value.
|
||||
|
||||
@ -2366,8 +2348,6 @@ void InterpreterMacroAssembler::compute_stack_base( Register Rdest ) {
|
||||
add( Lesp, wordSize, Rdest );
|
||||
}
|
||||
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
void InterpreterMacroAssembler::get_method_counters(Register method,
|
||||
Register Rcounters,
|
||||
Label& skip) {
|
||||
@ -2443,7 +2423,6 @@ void InterpreterMacroAssembler::increment_backedge_counter( Register Rcounters,
|
||||
// Note that this macro must leave backedge_count + invocation_count in Rtmp!
|
||||
}
|
||||
|
||||
#ifndef CC_INTERP
|
||||
void InterpreterMacroAssembler::test_backedge_count_for_osr( Register backedge_count,
|
||||
Register method_counters,
|
||||
Register branch_bcp,
|
||||
@ -2581,7 +2560,6 @@ void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
|
||||
br(cond, false, Assembler::pn, *where);
|
||||
delayed()->st(scratch1, counter_addr);
|
||||
}
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
// Inline assembly for:
|
||||
//
|
||||
@ -2597,8 +2575,6 @@ void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
|
||||
|
||||
void InterpreterMacroAssembler::notify_method_entry() {
|
||||
|
||||
// C++ interpreter only uses this for native methods.
|
||||
|
||||
// Whenever JVMTI puts a thread in interp_only_mode, method
|
||||
// entry/exit events are sent for that thread to track stack
|
||||
// depth. If it is possible to enter interp_only_mode we add
|
||||
@ -2647,7 +2623,6 @@ void InterpreterMacroAssembler::notify_method_entry() {
|
||||
void InterpreterMacroAssembler::notify_method_exit(bool is_native_method,
|
||||
TosState state,
|
||||
NotifyMethodExitMode mode) {
|
||||
// C++ interpreter only uses this for native methods.
|
||||
|
||||
// Whenever JVMTI puts a thread in interp_only_mode, method
|
||||
// entry/exit events are sent for that thread to track stack
|
||||
@ -2687,15 +2662,6 @@ void InterpreterMacroAssembler::notify_method_exit(bool is_native_method,
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::save_return_value(TosState state, bool is_native_call) {
|
||||
#ifdef CC_INTERP
|
||||
// result potentially in O0/O1: save it across calls
|
||||
stf(FloatRegisterImpl::D, F0, STATE(_native_fresult));
|
||||
#ifdef _LP64
|
||||
stx(O0, STATE(_native_lresult));
|
||||
#else
|
||||
std(O0, STATE(_native_lresult));
|
||||
#endif
|
||||
#else // CC_INTERP
|
||||
if (is_native_call) {
|
||||
stf(FloatRegisterImpl::D, F0, d_tmp);
|
||||
#ifdef _LP64
|
||||
@ -2706,18 +2672,9 @@ void InterpreterMacroAssembler::save_return_value(TosState state, bool is_native
|
||||
} else {
|
||||
push(state);
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::restore_return_value( TosState state, bool is_native_call) {
|
||||
#ifdef CC_INTERP
|
||||
ldf(FloatRegisterImpl::D, STATE(_native_fresult), F0);
|
||||
#ifdef _LP64
|
||||
ldx(STATE(_native_lresult), O0);
|
||||
#else
|
||||
ldd(STATE(_native_lresult), O0);
|
||||
#endif
|
||||
#else // CC_INTERP
|
||||
if (is_native_call) {
|
||||
ldf(FloatRegisterImpl::D, d_tmp, F0);
|
||||
#ifdef _LP64
|
||||
@ -2728,5 +2685,4 @@ void InterpreterMacroAssembler::restore_return_value( TosState state, bool is_na
|
||||
} else {
|
||||
pop(state);
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
}
|
||||
|
@ -54,7 +54,6 @@ REGISTER_DECLARATION(FloatRegister, Ftos_d2, F1); // for 2nd part of double
|
||||
|
||||
class InterpreterMacroAssembler: public MacroAssembler {
|
||||
protected:
|
||||
#ifndef CC_INTERP
|
||||
// Interpreter specific version of call_VM_base
|
||||
virtual void call_VM_leaf_base(
|
||||
Register java_thread,
|
||||
@ -76,7 +75,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
|
||||
// base routine for all dispatches
|
||||
void dispatch_base(TosState state, address* table);
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
public:
|
||||
InterpreterMacroAssembler(CodeBuffer* c)
|
||||
@ -84,12 +82,10 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
|
||||
void jump_to_entry(address entry);
|
||||
|
||||
#ifndef CC_INTERP
|
||||
virtual void load_earlyret_value(TosState state);
|
||||
|
||||
static const Address l_tmp ;
|
||||
static const Address d_tmp ;
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
// helper routine for frame allocation/deallocation
|
||||
// compute the delta by which the caller's SP has to
|
||||
@ -97,8 +93,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
// locals
|
||||
void compute_extra_locals_size_in_bytes(Register args_size, Register locals_size, Register delta);
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// dispatch routines
|
||||
void dispatch_prolog(TosState state, int step = 0);
|
||||
void dispatch_epilog(TosState state, int step = 0);
|
||||
@ -118,7 +112,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
|
||||
protected:
|
||||
void dispatch_Lbyte_code(TosState state, address* table, int bcp_incr = 0, bool verify = true);
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
public:
|
||||
// Super call_VM calls - correspond to MacroAssembler::call_VM(_leaf) calls
|
||||
@ -130,7 +123,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
Register arg_2,
|
||||
bool check_exception = true);
|
||||
|
||||
#ifndef CC_INTERP
|
||||
void super_call_VM_leaf(Register thread_cache, address entry_point, Register arg_1, Register arg_2);
|
||||
|
||||
// Generate a subtype check: branch to ok_is_subtype if sub_klass is
|
||||
@ -265,19 +257,15 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
Address top_most_monitor();
|
||||
void compute_stack_base( Register Rdest );
|
||||
|
||||
#endif /* CC_INTERP */
|
||||
void get_method_counters(Register method, Register Rcounters, Label& skip);
|
||||
void increment_invocation_counter( Register Rcounters, Register Rtmp, Register Rtmp2 );
|
||||
void increment_backedge_counter( Register Rcounters, Register Rtmp, Register Rtmp2 );
|
||||
#ifndef CC_INTERP
|
||||
void test_backedge_count_for_osr(Register backedge_count, Register method_counters, Register branch_bcp, Register Rtmp );
|
||||
|
||||
#endif /* CC_INTERP */
|
||||
// Object locking
|
||||
void lock_object (Register lock_reg, Register obj_reg);
|
||||
void unlock_object(Register lock_reg);
|
||||
|
||||
#ifndef CC_INTERP
|
||||
// Interpreter profiling operations
|
||||
void set_method_data_pointer();
|
||||
void set_method_data_pointer_for_bcp();
|
||||
@ -341,7 +329,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
void verify_oop_or_return_address(Register reg, Register rtmp); // for astore
|
||||
void verify_FPU(int stack_depth, TosState state = ftos); // only if +VerifyFPU && (state == ftos || state == dtos)
|
||||
|
||||
#endif /* CC_INTERP */
|
||||
// support for JVMTI/Dtrace
|
||||
typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
|
||||
void notify_method_entry();
|
||||
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 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 CPU_SPARC_VM_INTERPRETERGENERATOR_SPARC_HPP
|
||||
#define CPU_SPARC_VM_INTERPRETERGENERATOR_SPARC_HPP
|
||||
|
||||
friend class AbstractInterpreterGenerator;
|
||||
|
||||
private:
|
||||
|
||||
address generate_normal_entry(bool synchronized);
|
||||
address generate_native_entry(bool synchronized);
|
||||
address generate_abstract_entry(void);
|
||||
// there are no math intrinsics on sparc
|
||||
address generate_math_entry(AbstractInterpreter::MethodKind kind) { return NULL; }
|
||||
address generate_accessor_entry(void) { return NULL; }
|
||||
address generate_empty_entry(void) { return NULL; }
|
||||
address generate_Reference_get_entry(void);
|
||||
void save_native_result(void);
|
||||
void restore_native_result(void);
|
||||
|
||||
void generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue);
|
||||
void generate_counter_overflow(Label& Lcontinue);
|
||||
|
||||
address generate_CRC32_update_entry();
|
||||
address generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind);
|
||||
|
||||
// Not supported
|
||||
address generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) { return NULL; }
|
||||
#endif // CPU_SPARC_VM_INTERPRETERGENERATOR_SPARC_HPP
|
@ -26,9 +26,9 @@
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
@ -53,7 +53,7 @@
|
||||
|
||||
// Generation of Interpreter
|
||||
//
|
||||
// The InterpreterGenerator generates the interpreter into Interpreter::_code.
|
||||
// The TemplateInterpreterGenerator generates the interpreter into Interpreter::_code.
|
||||
|
||||
|
||||
#define __ _masm->
|
||||
@ -194,7 +194,7 @@ address AbstractInterpreterGenerator::generate_slow_signature_handler() {
|
||||
}
|
||||
#endif
|
||||
|
||||
void InterpreterGenerator::generate_counter_overflow(Label& Lcontinue) {
|
||||
void TemplateInterpreterGenerator::generate_counter_overflow(Label& Lcontinue) {
|
||||
|
||||
// Generate code to initiate compilation on the counter overflow.
|
||||
|
||||
@ -219,7 +219,7 @@ void InterpreterGenerator::generate_counter_overflow(Label& Lcontinue) {
|
||||
// Abstract method entry
|
||||
// Attempt to execute abstract method. Throw exception
|
||||
//
|
||||
address InterpreterGenerator::generate_abstract_entry(void) {
|
||||
address TemplateInterpreterGenerator::generate_abstract_entry(void) {
|
||||
address entry = __ pc();
|
||||
// abstract method entry
|
||||
// throw exception
|
||||
|
@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_SPARC_VM_INTERPRETER_SPARC_HPP
|
||||
#define CPU_SPARC_VM_INTERPRETER_SPARC_HPP
|
||||
|
||||
public:
|
||||
|
||||
static int expr_offset_in_bytes(int i) { return stackElementSize * i + wordSize; }
|
||||
|
||||
// Stack index relative to tos (which points at value)
|
||||
static int expr_index_at(int i) { return stackElementWords * i; }
|
||||
|
||||
// Already negated by c++ interpreter
|
||||
static int local_index_at(int i) {
|
||||
assert(i <= 0, "local direction already negated");
|
||||
return stackElementWords * i;
|
||||
}
|
||||
|
||||
#endif // CPU_SPARC_VM_INTERPRETER_SPARC_HPP
|
@ -401,9 +401,6 @@ static Thread* verify_thread_subroutine(Thread* gthread_value) {
|
||||
void MacroAssembler::verify_thread() {
|
||||
if (VerifyThread) {
|
||||
// NOTE: this chops off the heads of the 64-bit O registers.
|
||||
#ifdef CC_INTERP
|
||||
save_frame(0);
|
||||
#else
|
||||
// make sure G2_thread contains the right value
|
||||
save_frame_and_mov(0, Lmethod, Lmethod); // to avoid clobbering O0 (and propagate Lmethod for -Xprof)
|
||||
mov(G1, L1); // avoid clobbering G1
|
||||
@ -411,7 +408,6 @@ void MacroAssembler::verify_thread() {
|
||||
mov(G3, L3); // avoid clobbering G3
|
||||
mov(G4, L4); // avoid clobbering G4
|
||||
mov(G5_method, L5); // avoid clobbering G5_method
|
||||
#endif /* CC_INTERP */
|
||||
#if defined(COMPILER2) && !defined(_LP64)
|
||||
// Save & restore possible 64-bit Long arguments in G-regs
|
||||
srlx(G1,32,L0);
|
||||
@ -530,11 +526,7 @@ void MacroAssembler::reset_last_Java_frame(void) {
|
||||
|
||||
#ifdef ASSERT
|
||||
// check that it WAS previously set
|
||||
#ifdef CC_INTERP
|
||||
save_frame(0);
|
||||
#else
|
||||
save_frame_and_mov(0, Lmethod, Lmethod); // Propagate Lmethod to helper frame for -Xprof
|
||||
#endif /* CC_INTERP */
|
||||
ld_ptr(sp_addr, L0);
|
||||
tst(L0);
|
||||
breakpoint_trap(Assembler::zero, Assembler::ptr_cc);
|
||||
@ -754,11 +746,7 @@ void MacroAssembler::set_vm_result(Register oop_result) {
|
||||
|
||||
# ifdef ASSERT
|
||||
// Check that we are not overwriting any other oop.
|
||||
#ifdef CC_INTERP
|
||||
save_frame(0);
|
||||
#else
|
||||
save_frame_and_mov(0, Lmethod, Lmethod); // Propagate Lmethod for -Xprof
|
||||
#endif /* CC_INTERP */
|
||||
ld_ptr(vm_result_addr, L0);
|
||||
tst(L0);
|
||||
restore();
|
||||
|
@ -136,25 +136,6 @@ REGISTER_DECLARATION(Register, Lentry_args , L0); // pointer to args passed
|
||||
|
||||
// Interpreter frames
|
||||
|
||||
#ifdef CC_INTERP
|
||||
REGISTER_DECLARATION(Register, Lstate , L0); // interpreter state object pointer
|
||||
REGISTER_DECLARATION(Register, L1_scratch , L1); // scratch
|
||||
REGISTER_DECLARATION(Register, Lmirror , L1); // mirror (for native methods only)
|
||||
REGISTER_DECLARATION(Register, L2_scratch , L2);
|
||||
REGISTER_DECLARATION(Register, L3_scratch , L3);
|
||||
REGISTER_DECLARATION(Register, L4_scratch , L4);
|
||||
REGISTER_DECLARATION(Register, Lscratch , L5); // C1 uses
|
||||
REGISTER_DECLARATION(Register, Lscratch2 , L6); // C1 uses
|
||||
REGISTER_DECLARATION(Register, L7_scratch , L7); // constant pool cache
|
||||
REGISTER_DECLARATION(Register, O5_savedSP , O5);
|
||||
REGISTER_DECLARATION(Register, I5_savedSP , I5); // Saved SP before bumping for locals. This is simply
|
||||
// a copy SP, so in 64-bit it's a biased value. The bias
|
||||
// is added and removed as needed in the frame code.
|
||||
// Interface to signature handler
|
||||
REGISTER_DECLARATION(Register, Llocals , L7); // pointer to locals for signature handler
|
||||
REGISTER_DECLARATION(Register, Lmethod , L6); // Method* when calling signature handler
|
||||
|
||||
#else
|
||||
REGISTER_DECLARATION(Register, Lesp , L0); // expression stack pointer
|
||||
REGISTER_DECLARATION(Register, Lbcp , L1); // pointer to next bytecode
|
||||
REGISTER_DECLARATION(Register, Lmethod , L2);
|
||||
@ -178,7 +159,6 @@ REGISTER_DECLARATION(Register, I5_savedSP , I5); // Saved SP before bumpin
|
||||
REGISTER_DECLARATION(Register, IdispatchTables , I4); // Base address of the bytecode dispatch tables
|
||||
REGISTER_DECLARATION(Register, IdispatchAddress , I3); // Register which saves the dispatch address for each bytecode
|
||||
REGISTER_DECLARATION(Register, ImethodDataPtr , I2); // Pointer to the current method data
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
// NOTE: Lscratch2 and LcpoolCache point to the same registers in
|
||||
// the interpreter code. If Lscratch2 needs to be used for some
|
||||
@ -233,19 +213,6 @@ REGISTER_DECLARATION(Register, Oissuing_pc , O1); // where the exception is comi
|
||||
#define Gframe_size AS_REGISTER(Register, Gframe_size)
|
||||
#define Gtemp AS_REGISTER(Register, Gtemp)
|
||||
|
||||
#ifdef CC_INTERP
|
||||
#define Lstate AS_REGISTER(Register, Lstate)
|
||||
#define Lesp AS_REGISTER(Register, Lesp)
|
||||
#define L1_scratch AS_REGISTER(Register, L1_scratch)
|
||||
#define Lmirror AS_REGISTER(Register, Lmirror)
|
||||
#define L2_scratch AS_REGISTER(Register, L2_scratch)
|
||||
#define L3_scratch AS_REGISTER(Register, L3_scratch)
|
||||
#define L4_scratch AS_REGISTER(Register, L4_scratch)
|
||||
#define Lscratch AS_REGISTER(Register, Lscratch)
|
||||
#define Lscratch2 AS_REGISTER(Register, Lscratch2)
|
||||
#define L7_scratch AS_REGISTER(Register, L7_scratch)
|
||||
#define Ostate AS_REGISTER(Register, Ostate)
|
||||
#else
|
||||
#define Lesp AS_REGISTER(Register, Lesp)
|
||||
#define Lbcp AS_REGISTER(Register, Lbcp)
|
||||
#define Lmethod AS_REGISTER(Register, Lmethod)
|
||||
@ -255,7 +222,6 @@ REGISTER_DECLARATION(Register, Oissuing_pc , O1); // where the exception is comi
|
||||
#define Lscratch AS_REGISTER(Register, Lscratch)
|
||||
#define Lscratch2 AS_REGISTER(Register, Lscratch2)
|
||||
#define LcpoolCache AS_REGISTER(Register, LcpoolCache)
|
||||
#endif /* ! CC_INTERP */
|
||||
|
||||
#define Lentry_args AS_REGISTER(Register, Lentry_args)
|
||||
#define I5_savedSP AS_REGISTER(Register, I5_savedSP)
|
||||
@ -610,13 +576,7 @@ class MacroAssembler : public Assembler {
|
||||
// This is the base routine called by the different versions of call_VM_leaf. The interpreter
|
||||
// may customize this version by overriding it for its purposes (e.g., to save/restore
|
||||
// additional registers when doing a VM call).
|
||||
#ifdef CC_INTERP
|
||||
#define VIRTUAL
|
||||
#else
|
||||
#define VIRTUAL virtual
|
||||
#endif
|
||||
|
||||
VIRTUAL void call_VM_leaf_base(Register thread_cache, address entry_point, int number_of_arguments);
|
||||
virtual void call_VM_leaf_base(Register thread_cache, address entry_point, int number_of_arguments);
|
||||
|
||||
//
|
||||
// It is imperative that all calls into the VM are handled via the call_VM macros.
|
||||
@ -1483,7 +1443,6 @@ public:
|
||||
void fold_8bit_crc32(Register xcrc, Register table, Register xtmp, Register tmp);
|
||||
void fold_8bit_crc32(Register crc, Register table, Register tmp);
|
||||
|
||||
#undef VIRTUAL
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 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
|
||||
@ -152,18 +152,6 @@ REGISTER_DEFINITION(Register, G5_method_type);
|
||||
REGISTER_DEFINITION(Register, G3_method_handle);
|
||||
REGISTER_DEFINITION(Register, L7_mh_SP_save);
|
||||
|
||||
#ifdef CC_INTERP
|
||||
REGISTER_DEFINITION(Register, Lstate);
|
||||
REGISTER_DEFINITION(Register, L1_scratch);
|
||||
REGISTER_DEFINITION(Register, Lmirror);
|
||||
REGISTER_DEFINITION(Register, L2_scratch);
|
||||
REGISTER_DEFINITION(Register, L3_scratch);
|
||||
REGISTER_DEFINITION(Register, L4_scratch);
|
||||
REGISTER_DEFINITION(Register, Lscratch);
|
||||
REGISTER_DEFINITION(Register, Lscratch2);
|
||||
REGISTER_DEFINITION(Register, L7_scratch);
|
||||
REGISTER_DEFINITION(Register, I5_savedSP);
|
||||
#else // CC_INTERP
|
||||
REGISTER_DEFINITION(Register, Lesp);
|
||||
REGISTER_DEFINITION(Register, Lbcp);
|
||||
REGISTER_DEFINITION(Register, Lmonitors);
|
||||
@ -177,7 +165,6 @@ REGISTER_DEFINITION(Register, O5_savedSP);
|
||||
REGISTER_DEFINITION(Register, IdispatchAddress);
|
||||
REGISTER_DEFINITION(Register, ImethodDataPtr);
|
||||
REGISTER_DEFINITION(Register, IdispatchTables);
|
||||
#endif // CC_INTERP
|
||||
REGISTER_DEFINITION(Register, Lmethod);
|
||||
REGISTER_DEFINITION(Register, Llocals);
|
||||
REGISTER_DEFINITION(Register, Oexception);
|
||||
|
@ -26,9 +26,9 @@
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
@ -47,7 +47,6 @@
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
#ifndef FAST_DISPATCH
|
||||
#define FAST_DISPATCH 1
|
||||
#endif
|
||||
@ -56,7 +55,7 @@
|
||||
|
||||
// Generation of Interpreter
|
||||
//
|
||||
// The InterpreterGenerator generates the interpreter into Interpreter::_code.
|
||||
// The TemplateInterpreterGenerator generates the interpreter into Interpreter::_code.
|
||||
|
||||
|
||||
#define __ _masm->
|
||||
@ -65,7 +64,7 @@
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void InterpreterGenerator::save_native_result(void) {
|
||||
void TemplateInterpreterGenerator::save_native_result(void) {
|
||||
// result potentially in O0/O1: save it across calls
|
||||
const Address& l_tmp = InterpreterMacroAssembler::l_tmp;
|
||||
|
||||
@ -81,7 +80,7 @@ void InterpreterGenerator::save_native_result(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void InterpreterGenerator::restore_native_result(void) {
|
||||
void TemplateInterpreterGenerator::restore_native_result(void) {
|
||||
const Address& l_tmp = InterpreterMacroAssembler::l_tmp;
|
||||
const Address& d_tmp = InterpreterMacroAssembler::d_tmp;
|
||||
|
||||
@ -293,7 +292,7 @@ address TemplateInterpreterGenerator::generate_continuation_for(TosState state)
|
||||
// Lmethod: method
|
||||
// ??: invocation counter
|
||||
//
|
||||
void InterpreterGenerator::generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue) {
|
||||
void TemplateInterpreterGenerator::generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue) {
|
||||
// Note: In tiered we increment either counters in MethodCounters* or in
|
||||
// MDO depending if we're profiling or not.
|
||||
const Register G3_method_counters = G3_scratch;
|
||||
@ -724,7 +723,7 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
|
||||
}
|
||||
|
||||
// Method entry for java.lang.ref.Reference.get.
|
||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
address TemplateInterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
#if INCLUDE_ALL_GCS
|
||||
// Code: _aload_0, _getfield, _areturn
|
||||
// parameter size = 1
|
||||
@ -807,7 +806,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
* Method entry for static native methods:
|
||||
* int java.util.zip.CRC32.update(int crc, int b)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
address TemplateInterpreterGenerator::generate_CRC32_update_entry() {
|
||||
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
@ -851,7 +850,7 @@ address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
* int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int len)
|
||||
* int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
@ -903,13 +902,22 @@ address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpret
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Not supported
|
||||
address TemplateInterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Not supported
|
||||
address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) {
|
||||
return NULL;
|
||||
}
|
||||
//
|
||||
// Interpreter stub for calling a native method. (asm interpreter)
|
||||
// This sets up a somewhat different looking stack for calling the native method
|
||||
// than the typical interpreter frame setup.
|
||||
//
|
||||
|
||||
address InterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
address entry = __ pc();
|
||||
|
||||
// the following temporary registers are used during frame creation
|
||||
@ -1336,7 +1344,7 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
|
||||
|
||||
// Generic method entry to (asm) interpreter
|
||||
address InterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
address entry = __ pc();
|
||||
|
||||
bool inc_counter = UseCompiler || CountCompiledCalls || LogTouchedMethods;
|
||||
@ -1743,14 +1751,6 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t, address& b
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
|
||||
InterpreterGenerator::InterpreterGenerator(StubQueue* code)
|
||||
: TemplateInterpreterGenerator(code) {
|
||||
generate_all(); // down here so it can be "virtual"
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
// Non-product code
|
||||
#ifndef PRODUCT
|
||||
address TemplateInterpreterGenerator::generate_trace_code(TosState state) {
|
||||
@ -1829,4 +1829,3 @@ void TemplateInterpreterGenerator::stop_interpreter_at() {
|
||||
__ breakpoint_trap(Assembler::equal, Assembler::icc);
|
||||
}
|
||||
#endif // not PRODUCT
|
||||
#endif // !CC_INTERP
|
||||
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_SPARC_VM_TEMPLATEINTERPRETERGENERATOR_SPARC_HPP
|
||||
#define CPU_SPARC_VM_TEMPLATEINTERPRETERGENERATOR_SPARC_HPP
|
||||
|
||||
protected:
|
||||
|
||||
void generate_fixed_frame(bool native_call); // template interpreter only
|
||||
void generate_stack_overflow_check(Register Rframe_size, Register Rscratch,
|
||||
Register Rscratch2);
|
||||
|
||||
#endif // CPU_SPARC_VM_TEMPLATEINTERPRETERGENERATOR_SPARC_HPP
|
@ -24,7 +24,6 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "oops/constMethod.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "runtime/arguments.hpp"
|
||||
@ -32,6 +31,18 @@
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
// Size of interpreter code. Increase if too small. Interpreter will
|
||||
// fail with a guarantee ("not enough space for interpreter generation");
|
||||
// if too small.
|
||||
// Run with +PrintInterpreter to get the VM to print out the size.
|
||||
// Max size with JVMTI
|
||||
#ifdef _LP64
|
||||
// The sethi() instruction generates lots more instructions when shell
|
||||
// stack limit is unlimited, so that's why this is much bigger.
|
||||
int TemplateInterpreter::InterpreterCodeSize = 260 * K;
|
||||
#else
|
||||
int TemplateInterpreter::InterpreterCodeSize = 230 * K;
|
||||
#endif
|
||||
|
||||
int AbstractInterpreter::BasicType_as_index(BasicType type) {
|
||||
int i = 0;
|
||||
@ -107,7 +118,7 @@ int AbstractInterpreter::size_activation(int max_stack,
|
||||
int callee_locals,
|
||||
bool is_top_frame) {
|
||||
// Note: This calculation must exactly parallel the frame setup
|
||||
// in InterpreterGenerator::generate_fixed_frame.
|
||||
// in TemplateInterpreterGenerator::generate_fixed_frame.
|
||||
|
||||
int monitor_size = monitors * frame::interpreter_frame_monitor_size();
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_SPARC_VM_TEMPLATEINTERPRETER_SPARC_HPP
|
||||
#define CPU_SPARC_VM_TEMPLATEINTERPRETER_SPARC_HPP
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Size of interpreter code. Increase if too small. Interpreter will
|
||||
// fail with a guarantee ("not enough space for interpreter generation");
|
||||
// if too small.
|
||||
// Run with +PrintInterpreter to get the VM to print out the size.
|
||||
// Max size with JVMTI
|
||||
|
||||
#ifdef _LP64
|
||||
// The sethi() instruction generates lots more instructions when shell
|
||||
// stack limit is unlimited, so that's why this is much bigger.
|
||||
const static int InterpreterCodeSize = 260 * K;
|
||||
#else
|
||||
const static int InterpreterCodeSize = 230 * K;
|
||||
#endif
|
||||
|
||||
#endif // CPU_SPARC_VM_TEMPLATEINTERPRETER_SPARC_HPP
|
@ -37,7 +37,6 @@
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
#define __ _masm->
|
||||
|
||||
// Misc helpers
|
||||
@ -3777,4 +3776,3 @@ void TemplateTable::multianewarray() {
|
||||
call_VM(Otos_i, CAST_FROM_FN_PTR(address, InterpreterRuntime::multianewarray), O1);
|
||||
__ add( Lesp, Lscratch, Lesp); // pop all dimensions off the stack
|
||||
}
|
||||
#endif /* !CC_INTERP */
|
||||
|
@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "interpreter/bytecodeInterpreter.hpp"
|
||||
#include "interpreter/bytecodeInterpreter.inline.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "prims/jvmtiExport.hpp"
|
||||
#include "prims/jvmtiThreadState.hpp"
|
||||
#include "runtime/deoptimization.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#ifdef TARGET_ARCH_x86
|
||||
# include "interp_masm_x86.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef CC_INTERP
|
||||
|
||||
#endif // CC_INTERP (all)
|
@ -1,115 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_X86_VM_BYTECODEINTERPRETER_X86_HPP
|
||||
#define CPU_X86_VM_BYTECODEINTERPRETER_X86_HPP
|
||||
|
||||
// Platform specific for C++ based Interpreter
|
||||
|
||||
private:
|
||||
|
||||
interpreterState _self_link; /* Previous interpreter state */ /* sometimes points to self??? */
|
||||
address _result_handler; /* temp for saving native result handler */
|
||||
intptr_t* _sender_sp; /* sender's sp before stack (locals) extension */
|
||||
|
||||
address _extra_junk1; /* temp to save on recompiles */
|
||||
address _extra_junk2; /* temp to save on recompiles */
|
||||
address _extra_junk3; /* temp to save on recompiles */
|
||||
// address dummy_for_native2; /* a native frame result handler would be here... */
|
||||
// address dummy_for_native1; /* native result type stored here in a interpreter native frame */
|
||||
address _extra_junk4; /* temp to save on recompiles */
|
||||
address _extra_junk5; /* temp to save on recompiles */
|
||||
address _extra_junk6; /* temp to save on recompiles */
|
||||
public:
|
||||
// we have an interpreter frame...
|
||||
inline intptr_t* sender_sp() {
|
||||
return _sender_sp;
|
||||
}
|
||||
|
||||
// The interpreter always has the frame anchor fully setup so we don't
|
||||
// have to do anything going to vm from the interpreter. On return
|
||||
// we do have to clear the flags in case they we're modified to
|
||||
// maintain the stack walking invariants.
|
||||
//
|
||||
#define SET_LAST_JAVA_FRAME()
|
||||
|
||||
#define RESET_LAST_JAVA_FRAME()
|
||||
|
||||
/*
|
||||
* Macros for accessing the stack.
|
||||
*/
|
||||
#undef STACK_INT
|
||||
#undef STACK_FLOAT
|
||||
#undef STACK_ADDR
|
||||
#undef STACK_OBJECT
|
||||
#undef STACK_DOUBLE
|
||||
#undef STACK_LONG
|
||||
|
||||
// JavaStack Implementation
|
||||
|
||||
#define GET_STACK_SLOT(offset) (*((intptr_t*) &topOfStack[-(offset)]))
|
||||
#define STACK_SLOT(offset) ((address) &topOfStack[-(offset)])
|
||||
#define STACK_ADDR(offset) (*((address *) &topOfStack[-(offset)]))
|
||||
#define STACK_INT(offset) (*((jint*) &topOfStack[-(offset)]))
|
||||
#define STACK_FLOAT(offset) (*((jfloat *) &topOfStack[-(offset)]))
|
||||
#define STACK_OBJECT(offset) (*((oop *) &topOfStack [-(offset)]))
|
||||
#define STACK_DOUBLE(offset) (((VMJavaVal64*) &topOfStack[-(offset)])->d)
|
||||
#define STACK_LONG(offset) (((VMJavaVal64 *) &topOfStack[-(offset)])->l)
|
||||
|
||||
#define SET_STACK_SLOT(value, offset) (*(intptr_t*)&topOfStack[-(offset)] = *(intptr_t*)(value))
|
||||
#define SET_STACK_ADDR(value, offset) (*((address *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_INT(value, offset) (*((jint *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_FLOAT(value, offset) (*((jfloat *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_OBJECT(value, offset) (*((oop *)&topOfStack[-(offset)]) = (value))
|
||||
#define SET_STACK_DOUBLE(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = (value))
|
||||
#define SET_STACK_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = \
|
||||
((VMJavaVal64*)(addr))->d)
|
||||
#define SET_STACK_LONG(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->l = (value))
|
||||
#define SET_STACK_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->l = \
|
||||
((VMJavaVal64*)(addr))->l)
|
||||
// JavaLocals implementation
|
||||
|
||||
#define LOCALS_SLOT(offset) ((intptr_t*)&locals[-(offset)])
|
||||
#define LOCALS_ADDR(offset) ((address)locals[-(offset)])
|
||||
#define LOCALS_INT(offset) ((jint)(locals[-(offset)]))
|
||||
#define LOCALS_FLOAT(offset) (*((jfloat*)&locals[-(offset)]))
|
||||
#define LOCALS_OBJECT(offset) (cast_to_oop(locals[-(offset)]))
|
||||
#define LOCALS_DOUBLE(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->d)
|
||||
#define LOCALS_LONG(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->l)
|
||||
#define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)]))
|
||||
#define LOCALS_DOUBLE_AT(offset) (((address)&locals[-((offset) + 1)]))
|
||||
|
||||
#define SET_LOCALS_SLOT(value, offset) (*(intptr_t*)&locals[-(offset)] = *(intptr_t *)(value))
|
||||
#define SET_LOCALS_ADDR(value, offset) (*((address *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_INT(value, offset) (*((jint *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_FLOAT(value, offset) (*((jfloat *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_OBJECT(value, offset) (*((oop *)&locals[-(offset)]) = (value))
|
||||
#define SET_LOCALS_DOUBLE(value, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = (value))
|
||||
#define SET_LOCALS_LONG(value, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = (value))
|
||||
#define SET_LOCALS_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = \
|
||||
((VMJavaVal64*)(addr))->d)
|
||||
#define SET_LOCALS_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = \
|
||||
((VMJavaVal64*)(addr))->l)
|
||||
|
||||
#endif // CPU_X86_VM_BYTECODEINTERPRETER_X86_HPP
|
@ -1,285 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_X86_VM_BYTECODEINTERPRETER_X86_INLINE_HPP
|
||||
#define CPU_X86_VM_BYTECODEINTERPRETER_X86_INLINE_HPP
|
||||
|
||||
// Inline interpreter functions for IA32
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMfloatAdd(jfloat op1, jfloat op2) { return op1 + op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatSub(jfloat op1, jfloat op2) { return op1 - op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatMul(jfloat op1, jfloat op2) { return op1 * op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatDiv(jfloat op1, jfloat op2) { return op1 / op2; }
|
||||
inline jfloat BytecodeInterpreter::VMfloatRem(jfloat op1, jfloat op2) { return fmod(op1, op2); }
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMfloatNeg(jfloat op) { return -op; }
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMfloatCompare(jfloat op1, jfloat op2, int32_t direction) {
|
||||
return ( op1 < op2 ? -1 :
|
||||
op1 > op2 ? 1 :
|
||||
op1 == op2 ? 0 :
|
||||
(direction == -1 || direction == 1) ? direction : 0);
|
||||
|
||||
}
|
||||
|
||||
inline void BytecodeInterpreter::VMmemCopy64(uint32_t to[2], const uint32_t from[2]) {
|
||||
// x86 can do unaligned copies but not 64bits at a time
|
||||
to[0] = from[0]; to[1] = from[1];
|
||||
}
|
||||
|
||||
// The long operations depend on compiler support for "long long" on x86
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongAdd(jlong op1, jlong op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongAnd(jlong op1, jlong op2) {
|
||||
return op1 & op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongDiv(jlong op1, jlong op2) {
|
||||
// QQQ what about check and throw...
|
||||
return op1 / op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongMul(jlong op1, jlong op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongOr(jlong op1, jlong op2) {
|
||||
return op1 | op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongSub(jlong op1, jlong op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongXor(jlong op1, jlong op2) {
|
||||
return op1 ^ op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongRem(jlong op1, jlong op2) {
|
||||
return op1 % op2;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongUshr(jlong op1, jint op2) {
|
||||
// CVM did this 0x3f mask, is the really needed??? QQQ
|
||||
return ((unsigned long long) op1) >> (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongShr(jlong op1, jint op2) {
|
||||
return op1 >> (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongShl(jlong op1, jint op2) {
|
||||
return op1 << (op2 & 0x3F);
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongNeg(jlong op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMlongNot(jlong op) {
|
||||
return ~op;
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLtz(jlong op) {
|
||||
return (op <= 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGez(jlong op) {
|
||||
return (op >= 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongEqz(jlong op) {
|
||||
return (op == 0);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongEq(jlong op1, jlong op2) {
|
||||
return (op1 == op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongNe(jlong op1, jlong op2) {
|
||||
return (op1 != op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGe(jlong op1, jlong op2) {
|
||||
return (op1 >= op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLe(jlong op1, jlong op2) {
|
||||
return (op1 <= op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongLt(jlong op1, jlong op2) {
|
||||
return (op1 < op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongGt(jlong op1, jlong op2) {
|
||||
return (op1 > op2);
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMlongCompare(jlong op1, jlong op2) {
|
||||
return (VMlongLt(op1, op2) ? -1 : VMlongGt(op1, op2) ? 1 : 0);
|
||||
}
|
||||
|
||||
// Long conversions
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMlong2Double(jlong val) {
|
||||
return (jdouble) val;
|
||||
}
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMlong2Float(jlong val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMlong2Int(jlong val) {
|
||||
return (jint) val;
|
||||
}
|
||||
|
||||
// Double Arithmetic
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleAdd(jdouble op1, jdouble op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleDiv(jdouble op1, jdouble op2) {
|
||||
// Divide by zero... QQQ
|
||||
return op1 / op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleMul(jdouble op1, jdouble op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleNeg(jdouble op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleRem(jdouble op1, jdouble op2) {
|
||||
return fmod(op1, op2);
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMdoubleSub(jdouble op1, jdouble op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline int32_t BytecodeInterpreter::VMdoubleCompare(jdouble op1, jdouble op2, int32_t direction) {
|
||||
return ( op1 < op2 ? -1 :
|
||||
op1 > op2 ? 1 :
|
||||
op1 == op2 ? 0 :
|
||||
(direction == -1 || direction == 1) ? direction : 0);
|
||||
}
|
||||
|
||||
// Double Conversions
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMdouble2Float(jdouble val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
// Float Conversions
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMfloat2Double(jfloat op) {
|
||||
return (jdouble) op;
|
||||
}
|
||||
|
||||
// Integer Arithmetic
|
||||
|
||||
inline jint BytecodeInterpreter::VMintAdd(jint op1, jint op2) {
|
||||
return op1 + op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintAnd(jint op1, jint op2) {
|
||||
return op1 & op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) {
|
||||
/* it's possible we could catch this special case implicitly */
|
||||
if ((juint)op1 == 0x80000000 && op2 == -1) return op1;
|
||||
else return op1 / op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintMul(jint op1, jint op2) {
|
||||
return op1 * op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintNeg(jint op) {
|
||||
return -op;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintOr(jint op1, jint op2) {
|
||||
return op1 | op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) {
|
||||
/* it's possible we could catch this special case implicitly */
|
||||
if ((juint)op1 == 0x80000000 && op2 == -1) return 0;
|
||||
else return op1 % op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintShl(jint op1, jint op2) {
|
||||
return op1 << op2;
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintShr(jint op1, jint op2) {
|
||||
return op1 >> (op2 & 0x1f);
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintSub(jint op1, jint op2) {
|
||||
return op1 - op2;
|
||||
}
|
||||
|
||||
inline juint BytecodeInterpreter::VMintUshr(jint op1, jint op2) {
|
||||
return ((juint) op1) >> (op2 & 0x1f);
|
||||
}
|
||||
|
||||
inline jint BytecodeInterpreter::VMintXor(jint op1, jint op2) {
|
||||
return op1 ^ op2;
|
||||
}
|
||||
|
||||
inline jdouble BytecodeInterpreter::VMint2Double(jint val) {
|
||||
return (jdouble) val;
|
||||
}
|
||||
|
||||
inline jfloat BytecodeInterpreter::VMint2Float(jint val) {
|
||||
return (jfloat) val;
|
||||
}
|
||||
|
||||
inline jlong BytecodeInterpreter::VMint2Long(jint val) {
|
||||
return (jlong) val;
|
||||
}
|
||||
|
||||
inline jchar BytecodeInterpreter::VMint2Char(jint val) {
|
||||
return (jchar) val;
|
||||
}
|
||||
|
||||
inline jshort BytecodeInterpreter::VMint2Short(jint val) {
|
||||
return (jshort) val;
|
||||
}
|
||||
|
||||
inline jbyte BytecodeInterpreter::VMint2Byte(jint val) {
|
||||
return (jbyte) val;
|
||||
}
|
||||
|
||||
#endif // CPU_X86_VM_BYTECODEINTERPRETER_X86_INLINE_HPP
|
@ -38,11 +38,7 @@ define_pd_global(bool, InlineIntrinsics, true);
|
||||
define_pd_global(bool, PreferInterpreterNativeStubs, false);
|
||||
define_pd_global(bool, ProfileTraps, true);
|
||||
define_pd_global(bool, UseOnStackReplacement, true);
|
||||
#ifdef CC_INTERP
|
||||
define_pd_global(bool, ProfileInterpreter, false);
|
||||
#else
|
||||
define_pd_global(bool, ProfileInterpreter, true);
|
||||
#endif // CC_INTERP
|
||||
define_pd_global(bool, TieredCompilation, trueInTiered);
|
||||
define_pd_global(intx, CompileThreshold, 10000);
|
||||
|
||||
|
@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 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 CPU_X86_VM_CPPINTERPRETERGENERATOR_X86_HPP
|
||||
#define CPU_X86_VM_CPPINTERPRETERGENERATOR_X86_HPP
|
||||
|
||||
protected:
|
||||
|
||||
void generate_more_monitors();
|
||||
void generate_deopt_handling();
|
||||
void lock_method(void);
|
||||
address generate_interpreter_frame_manager(bool synchronized); // C++ interpreter only
|
||||
void generate_compute_interpreter_state(const Register state,
|
||||
const Register prev_state,
|
||||
const Register sender_sp,
|
||||
bool native); // C++ interpreter only
|
||||
|
||||
#endif // CPU_X86_VM_CPPINTERPRETERGENERATOR_X86_HPP
|
File diff suppressed because it is too large
Load Diff
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_X86_VM_CPPINTERPRETER_X86_HPP
|
||||
#define CPU_X86_VM_CPPINTERPRETER_X86_HPP
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Size of interpreter code. Increase if too small. Interpreter will
|
||||
// fail with a guarantee ("not enough space for interpreter generation");
|
||||
// if too small.
|
||||
// Run with +PrintInterpreter to get the VM to print out the size.
|
||||
// Max size with JVMTI
|
||||
const static int InterpreterCodeSize = 168 * 1024;
|
||||
|
||||
#endif // CPU_X86_VM_CPPINTERPRETER_X86_HPP
|
@ -314,26 +314,6 @@ intptr_t* frame::entry_frame_argument_at(int offset) const {
|
||||
}
|
||||
|
||||
// sender_sp
|
||||
#ifdef CC_INTERP
|
||||
intptr_t* frame::interpreter_frame_sender_sp() const {
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
// QQQ why does this specialize method exist if frame::sender_sp() does same thing?
|
||||
// seems odd and if we always know interpreted vs. non then sender_sp() is really
|
||||
// doing too much work.
|
||||
return get_interpreterState()->sender_sp();
|
||||
}
|
||||
|
||||
// monitor elements
|
||||
|
||||
BasicObjectLock* frame::interpreter_frame_monitor_begin() const {
|
||||
return get_interpreterState()->monitor_base();
|
||||
}
|
||||
|
||||
BasicObjectLock* frame::interpreter_frame_monitor_end() const {
|
||||
return (BasicObjectLock*) get_interpreterState()->stack_base();
|
||||
}
|
||||
|
||||
#else // CC_INTERP
|
||||
|
||||
intptr_t* frame::interpreter_frame_sender_sp() const {
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
@ -368,7 +348,6 @@ void frame::interpreter_frame_set_monitor_end(BasicObjectLock* value) {
|
||||
void frame::interpreter_frame_set_last_sp(intptr_t* sp) {
|
||||
*((intptr_t**)addr_at(interpreter_frame_last_sp_offset)) = sp;
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
||||
frame frame::sender_for_entry_frame(RegisterMap* map) const {
|
||||
assert(map != NULL, "map must be set");
|
||||
@ -524,9 +503,6 @@ frame frame::sender(RegisterMap* map) const {
|
||||
}
|
||||
|
||||
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
// QQQ
|
||||
#ifdef CC_INTERP
|
||||
#else
|
||||
assert(is_interpreted_frame(), "Not an interpreted frame");
|
||||
// These are reasonable sanity checks
|
||||
if (fp() == 0 || (intptr_t(fp()) & (wordSize-1)) != 0) {
|
||||
@ -545,7 +521,6 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
}
|
||||
|
||||
// do some validation of frame elements
|
||||
|
||||
// first the method
|
||||
|
||||
Method* m = *interpreter_frame_method_addr();
|
||||
@ -580,17 +555,10 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
if (locals > thread->stack_base() || locals < (address) fp()) return false;
|
||||
|
||||
// We'd have to be pretty unlucky to be mislead at this point
|
||||
|
||||
#endif // CC_INTERP
|
||||
return true;
|
||||
}
|
||||
|
||||
BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) {
|
||||
#ifdef CC_INTERP
|
||||
// Needed for JVMTI. The result should always be in the
|
||||
// interpreterState object
|
||||
interpreterState istate = get_interpreterState();
|
||||
#endif // CC_INTERP
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
Method* method = interpreter_frame_method();
|
||||
BasicType type = method->result_type();
|
||||
@ -620,11 +588,7 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result)
|
||||
case T_ARRAY : {
|
||||
oop obj;
|
||||
if (method->is_native()) {
|
||||
#ifdef CC_INTERP
|
||||
obj = istate->_oop_temp;
|
||||
#else
|
||||
obj = cast_to_oop(at(interpreter_frame_oop_temp_offset));
|
||||
#endif // CC_INTERP
|
||||
} else {
|
||||
oop* obj_p = (oop*)tos_addr;
|
||||
obj = (obj_p == NULL) ? (oop)NULL : *obj_p;
|
||||
@ -673,7 +637,6 @@ intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
|
||||
|
||||
void frame::describe_pd(FrameValues& values, int frame_no) {
|
||||
if (is_interpreted_frame()) {
|
||||
#ifndef CC_INTERP
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_sender_sp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_last_sp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_method);
|
||||
@ -692,7 +655,6 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
|
||||
}
|
||||
#endif // AMD64
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
|
||||
|
@ -101,8 +101,6 @@
|
||||
// non-interpreter frames
|
||||
sender_sp_offset = 2,
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// Interpreter frames
|
||||
interpreter_frame_result_handler_offset = 3, // for native calls only
|
||||
interpreter_frame_oop_temp_offset = 2, // for native calls only
|
||||
@ -120,8 +118,6 @@
|
||||
interpreter_frame_monitor_block_top_offset = interpreter_frame_initial_sp_offset,
|
||||
interpreter_frame_monitor_block_bottom_offset = interpreter_frame_initial_sp_offset,
|
||||
|
||||
#endif // CC_INTERP
|
||||
|
||||
// Entry frames
|
||||
#ifdef AMD64
|
||||
#ifdef _WIN64
|
||||
@ -193,13 +189,7 @@
|
||||
// helper to update a map with callee-saved RBP
|
||||
static void update_map_with_saved_link(RegisterMap* map, intptr_t** link_addr);
|
||||
|
||||
#ifndef CC_INTERP
|
||||
// deoptimization support
|
||||
void interpreter_frame_set_last_sp(intptr_t* sp);
|
||||
#endif // CC_INTERP
|
||||
|
||||
#ifdef CC_INTERP
|
||||
inline interpreterState get_interpreterState() const;
|
||||
#endif // CC_INTERP
|
||||
|
||||
#endif // CPU_X86_VM_FRAME_X86_HPP
|
||||
|
@ -151,59 +151,6 @@ inline intptr_t* frame::unextended_sp() const { return _unextended_sp; }
|
||||
inline address* frame::sender_pc_addr() const { return (address*) addr_at( return_addr_offset); }
|
||||
inline address frame::sender_pc() const { return *sender_pc_addr(); }
|
||||
|
||||
#ifdef CC_INTERP
|
||||
|
||||
inline interpreterState frame::get_interpreterState() const {
|
||||
return ((interpreterState)addr_at( -((int)sizeof(BytecodeInterpreter))/wordSize ));
|
||||
}
|
||||
|
||||
inline intptr_t* frame::sender_sp() const {
|
||||
// Hmm this seems awfully expensive QQQ, is this really called with interpreted frames?
|
||||
if (is_interpreted_frame()) {
|
||||
assert(false, "should never happen");
|
||||
return get_interpreterState()->sender_sp();
|
||||
} else {
|
||||
return addr_at(sender_sp_offset);
|
||||
}
|
||||
}
|
||||
|
||||
inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return &(get_interpreterState()->_locals);
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_bcp_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return (intptr_t*) &(get_interpreterState()->_bcp);
|
||||
}
|
||||
|
||||
|
||||
// Constant pool cache
|
||||
|
||||
inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return &(get_interpreterState()->_constants);
|
||||
}
|
||||
|
||||
// Method
|
||||
|
||||
inline Method** frame::interpreter_frame_method_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return &(get_interpreterState()->_method);
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return (intptr_t*) &(get_interpreterState()->_mdx);
|
||||
}
|
||||
|
||||
// top of expression stack
|
||||
inline intptr_t* frame::interpreter_frame_tos_address() const {
|
||||
assert(is_interpreted_frame(), "wrong frame type");
|
||||
return get_interpreterState()->_stack + 1;
|
||||
}
|
||||
|
||||
#else /* asm interpreter */
|
||||
inline intptr_t* frame::sender_sp() const { return addr_at( sender_sp_offset); }
|
||||
|
||||
inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
@ -255,8 +202,6 @@ inline oop* frame::interpreter_frame_temp_oop_addr() const {
|
||||
return (oop *)(fp() + interpreter_frame_oop_temp_offset);
|
||||
}
|
||||
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
inline int frame::pd_oop_map_offset_adjustment() const {
|
||||
return 0;
|
||||
}
|
||||
|
@ -45,7 +45,6 @@ void InterpreterMacroAssembler::jump_to_entry(address entry) {
|
||||
jump(RuntimeAddress(entry));
|
||||
}
|
||||
|
||||
#ifndef CC_INTERP
|
||||
void InterpreterMacroAssembler::profile_obj_type(Register obj, const Address& mdo_addr) {
|
||||
Label update, next, none;
|
||||
|
||||
@ -246,16 +245,7 @@ void InterpreterMacroAssembler::profile_parameters_type(Register mdp, Register t
|
||||
bind(profile_continue);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CC_INTERP
|
||||
void InterpreterMacroAssembler::get_method(Register reg) {
|
||||
movptr(reg, Address(rbp, -(sizeof(BytecodeInterpreter) + 2 * wordSize)));
|
||||
movptr(reg, Address(reg, byte_offset_of(BytecodeInterpreter, _method)));
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
||||
#ifndef CC_INTERP
|
||||
void InterpreterMacroAssembler::call_VM_leaf_base(address entry_point,
|
||||
int number_of_arguments) {
|
||||
// interpreter specific
|
||||
@ -1046,7 +1036,6 @@ void InterpreterMacroAssembler::remove_activation(
|
||||
pop(ret_addr); // get return address
|
||||
mov(rsp, rbx); // set sp to sender sp
|
||||
}
|
||||
#endif // !CC_INTERP
|
||||
|
||||
void InterpreterMacroAssembler::get_method_counters(Register method,
|
||||
Register mcs, Label& skip) {
|
||||
@ -1227,7 +1216,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) {
|
||||
restore_bcp();
|
||||
}
|
||||
}
|
||||
#ifndef CC_INTERP
|
||||
|
||||
void InterpreterMacroAssembler::test_method_data_pointer(Register mdp,
|
||||
Label& zero_continue) {
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
@ -1886,7 +1875,6 @@ void InterpreterMacroAssembler::increment_mask_and_jump(Address counter_addr,
|
||||
andl(scratch, mask);
|
||||
jcc(cond, *where);
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
||||
void InterpreterMacroAssembler::notify_method_entry() {
|
||||
// Whenever JVMTI is interp_only_mode, method entry/exit events are sent to
|
||||
@ -1938,9 +1926,8 @@ void InterpreterMacroAssembler::notify_method_exit(
|
||||
// is changed then the interpreter_frame_result implementation will
|
||||
// need to be updated too.
|
||||
|
||||
// For c++ interpreter the result is always stored at a known location in the frame
|
||||
// template interpreter will leave it on the top of the stack.
|
||||
NOT_CC_INTERP(push(state);)
|
||||
// template interpreter will leave the result on the top of the stack.
|
||||
push(state);
|
||||
NOT_LP64(get_thread(rthread);)
|
||||
movl(rdx, Address(rthread, JavaThread::interp_only_mode_offset()));
|
||||
testl(rdx, rdx);
|
||||
@ -1948,16 +1935,16 @@ void InterpreterMacroAssembler::notify_method_exit(
|
||||
call_VM(noreg,
|
||||
CAST_FROM_FN_PTR(address, InterpreterRuntime::post_method_exit));
|
||||
bind(L);
|
||||
NOT_CC_INTERP(pop(state));
|
||||
pop(state);
|
||||
}
|
||||
|
||||
{
|
||||
SkipIfEqual skip(this, &DTraceMethodProbes, false);
|
||||
NOT_CC_INTERP(push(state));
|
||||
push(state);
|
||||
NOT_LP64(get_thread(rthread);)
|
||||
get_method(rarg);
|
||||
call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit),
|
||||
rthread, rarg);
|
||||
NOT_CC_INTERP(pop(state));
|
||||
pop(state);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ typedef ByteSize (*OffsetFunction)(uint);
|
||||
|
||||
class InterpreterMacroAssembler: public MacroAssembler {
|
||||
|
||||
#ifndef CC_INTERP
|
||||
protected:
|
||||
// Interpreter specific version of call_VM_base
|
||||
virtual void call_VM_leaf_base(address entry_point,
|
||||
@ -54,7 +53,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
|
||||
// base routine for all dispatches
|
||||
void dispatch_base(TosState state, address* table, bool verifyoop = true);
|
||||
#endif // CC_INTERP
|
||||
|
||||
public:
|
||||
InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code),
|
||||
@ -65,15 +63,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
|
||||
void load_earlyret_value(TosState state);
|
||||
|
||||
#ifdef CC_INTERP
|
||||
void save_bcp() { /* not needed in c++ interpreter and harmless */ }
|
||||
void restore_bcp() { /* not needed in c++ interpreter and harmless */ }
|
||||
|
||||
// Helpers for runtime call arguments/results
|
||||
void get_method(Register reg);
|
||||
|
||||
#else
|
||||
|
||||
// Interpreter-specific registers
|
||||
void save_bcp() {
|
||||
movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), _bcp_register);
|
||||
@ -219,15 +208,12 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
bool throw_monitor_exception = true,
|
||||
bool install_monitor_exception = true,
|
||||
bool notify_jvmdi = true);
|
||||
#endif // CC_INTERP
|
||||
void get_method_counters(Register method, Register mcs, Label& skip);
|
||||
|
||||
// Object locking
|
||||
void lock_object (Register lock_reg);
|
||||
void unlock_object(Register lock_reg);
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// Interpreter profiling operations
|
||||
void set_method_data_pointer_for_bcp();
|
||||
void test_method_data_pointer(Register mdp, Label& zero_continue);
|
||||
@ -285,8 +271,6 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
// only if +VerifyFPU && (state == ftos || state == dtos)
|
||||
void verify_FPU(int stack_depth, TosState state = ftos);
|
||||
|
||||
#endif // !CC_INTERP
|
||||
|
||||
typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
|
||||
|
||||
// support for jvmti/dtrace
|
||||
@ -299,12 +283,10 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
Register _bcp_register; // register that contains the bcp
|
||||
|
||||
public:
|
||||
#ifndef CC_INTERP
|
||||
void profile_obj_type(Register obj, const Address& mdo_addr);
|
||||
void profile_arguments_type(Register mdp, Register callee, Register tmp, bool is_virtual);
|
||||
void profile_return_type(Register mdp, Register ret, Register tmp);
|
||||
void profile_parameters_type(Register mdp, Register tmp1, Register tmp2);
|
||||
#endif /* !CC_INTERP */
|
||||
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 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
|
||||
@ -25,26 +25,24 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
// Abstract method entry
|
||||
// Attempt to execute abstract method. Throw exception
|
||||
address InterpreterGenerator::generate_abstract_entry(void) {
|
||||
address TemplateInterpreterGenerator::generate_abstract_entry(void) {
|
||||
|
||||
address entry_point = __ pc();
|
||||
|
||||
// abstract method entry
|
||||
|
||||
#ifndef CC_INTERP
|
||||
// pop return address, reset last_sp to NULL
|
||||
__ empty_expression_stack();
|
||||
__ restore_bcp(); // rsi must be correct for exception handler (was destroyed)
|
||||
__ restore_locals(); // make sure locals pointer is correct as well (was destroyed)
|
||||
#endif
|
||||
|
||||
// throw exception
|
||||
__ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_AbstractMethodError));
|
||||
|
@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 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 CPU_X86_VM_INTERPRETERGENERATOR_X86_HPP
|
||||
#define CPU_X86_VM_INTERPRETERGENERATOR_X86_HPP
|
||||
|
||||
|
||||
// Generation of Interpreter
|
||||
//
|
||||
friend class AbstractInterpreterGenerator;
|
||||
|
||||
private:
|
||||
|
||||
address generate_normal_entry(bool synchronized);
|
||||
address generate_native_entry(bool synchronized);
|
||||
address generate_abstract_entry(void);
|
||||
address generate_math_entry(AbstractInterpreter::MethodKind kind);
|
||||
address generate_accessor_entry(void) { return NULL; }
|
||||
address generate_empty_entry(void) { return NULL; }
|
||||
address generate_Reference_get_entry();
|
||||
address generate_CRC32_update_entry();
|
||||
address generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind);
|
||||
address generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind);
|
||||
#ifndef _LP64
|
||||
address generate_Float_intBitsToFloat_entry();
|
||||
address generate_Float_floatToRawIntBits_entry();
|
||||
address generate_Double_longBitsToDouble_entry();
|
||||
address generate_Double_doubleToRawLongBits_entry();
|
||||
#endif
|
||||
void generate_stack_overflow_check(void);
|
||||
|
||||
void generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue);
|
||||
void generate_counter_overflow(Label* do_continue);
|
||||
|
||||
#endif // CPU_X86_VM_INTERPRETERGENERATOR_X86_HPP
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, 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 CPU_X86_VM_INTERPRETER_X86_HPP
|
||||
#define CPU_X86_VM_INTERPRETER_X86_HPP
|
||||
|
||||
public:
|
||||
static Address::ScaleFactor stackElementScale() {
|
||||
return NOT_LP64(Address::times_4) LP64_ONLY(Address::times_8);
|
||||
}
|
||||
|
||||
// Offset from rsp (which points to the last stack element)
|
||||
static int expr_offset_in_bytes(int i) { return stackElementSize * i; }
|
||||
|
||||
// Stack index relative to tos (which points at value)
|
||||
static int expr_index_at(int i) { return stackElementWords * i; }
|
||||
|
||||
// Already negated by c++ interpreter
|
||||
static int local_index_at(int i) {
|
||||
assert(i <= 0, "local direction already negated");
|
||||
return stackElementWords * i;
|
||||
}
|
||||
|
||||
#endif // CPU_X86_VM_INTERPRETER_X86_HPP
|
@ -26,9 +26,9 @@
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
@ -66,7 +66,7 @@ address AbstractInterpreterGenerator::generate_slow_signature_handler() {
|
||||
}
|
||||
|
||||
|
||||
address InterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) {
|
||||
address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) {
|
||||
|
||||
// rbx,: Method*
|
||||
// rcx: scratrch
|
||||
|
@ -26,9 +26,9 @@
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
@ -199,7 +199,7 @@ address AbstractInterpreterGenerator::generate_slow_signature_handler() {
|
||||
// Various method entries
|
||||
//
|
||||
|
||||
address InterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) {
|
||||
address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) {
|
||||
|
||||
// rbx,: Method*
|
||||
// rcx: scratrch
|
||||
|
@ -2525,11 +2525,9 @@ void MacroAssembler::call_VM_base(Register oop_result,
|
||||
// Only interpreter should have to clear fp
|
||||
reset_last_Java_frame(java_thread, true, false);
|
||||
|
||||
#ifndef CC_INTERP
|
||||
// C++ interp handles this in the interpreter
|
||||
check_and_handle_popframe(java_thread);
|
||||
check_and_handle_earlyret(java_thread);
|
||||
#endif /* CC_INTERP */
|
||||
|
||||
if (check_exceptions) {
|
||||
// check for pending exceptions (java_thread is set upon return)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -48,16 +48,9 @@ class MacroAssembler: public Assembler {
|
||||
// This is the base routine called by the different versions of call_VM_leaf. The interpreter
|
||||
// may customize this version by overriding it for its purposes (e.g., to save/restore
|
||||
// additional registers when doing a VM call).
|
||||
#ifdef CC_INTERP
|
||||
// c++ interpreter never wants to use interp_masm version of call_VM
|
||||
#define VIRTUAL
|
||||
#else
|
||||
#define VIRTUAL virtual
|
||||
#endif
|
||||
|
||||
#define COMMA ,
|
||||
|
||||
VIRTUAL void call_VM_leaf_base(
|
||||
virtual void call_VM_leaf_base(
|
||||
address entry_point, // the entry point
|
||||
int number_of_arguments // the number of arguments to pop after the call
|
||||
);
|
||||
@ -70,7 +63,7 @@ class MacroAssembler: public Assembler {
|
||||
// returns the register which contains the thread upon return. If a thread register has been
|
||||
// specified, the return value will correspond to that register. If no last_java_sp is specified
|
||||
// (noreg) than rsp will be used instead.
|
||||
VIRTUAL void call_VM_base( // returns the register containing the thread upon return
|
||||
virtual void call_VM_base( // returns the register containing the thread upon return
|
||||
Register oop_result, // where an oop-result ends up if any; use noreg otherwise
|
||||
Register java_thread, // the thread if computed before ; use noreg otherwise
|
||||
Register last_java_sp, // to set up last_Java_frame in stubs; use noreg otherwise
|
||||
@ -1422,8 +1415,6 @@ public:
|
||||
void byte_array_inflate(Register src, Register dst, Register len,
|
||||
XMMRegister tmp1, Register tmp2);
|
||||
|
||||
#undef VIRTUAL
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -2652,30 +2652,14 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
Label loop;
|
||||
__ bind(loop);
|
||||
__ movptr(rbx, Address(rsi, 0)); // Load frame size
|
||||
#ifdef CC_INTERP
|
||||
__ subptr(rbx, 4*wordSize); // we'll push pc and ebp by hand and
|
||||
#ifdef ASSERT
|
||||
__ push(0xDEADDEAD); // Make a recognizable pattern
|
||||
__ push(0xDEADDEAD);
|
||||
#else /* ASSERT */
|
||||
__ subptr(rsp, 2*wordSize); // skip the "static long no_param"
|
||||
#endif /* ASSERT */
|
||||
#else /* CC_INTERP */
|
||||
__ subptr(rbx, 2*wordSize); // we'll push pc and rbp, by hand
|
||||
#endif /* CC_INTERP */
|
||||
__ pushptr(Address(rcx, 0)); // save return address
|
||||
__ enter(); // save old & set new rbp,
|
||||
__ subptr(rsp, rbx); // Prolog!
|
||||
__ movptr(rbx, sp_temp); // sender's sp
|
||||
#ifdef CC_INTERP
|
||||
__ movptr(Address(rbp,
|
||||
-(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))),
|
||||
rbx); // Make it walkable
|
||||
#else /* CC_INTERP */
|
||||
// This value is corrected by layout_activation_impl
|
||||
__ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD);
|
||||
__ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), rbx); // Make it walkable
|
||||
#endif /* CC_INTERP */
|
||||
__ movptr(sp_temp, rsp); // pass to next frame
|
||||
__ addptr(rsi, wordSize); // Bump array pointer (sizes)
|
||||
__ addptr(rcx, wordSize); // Bump array pointer (pcs)
|
||||
@ -2894,30 +2878,14 @@ void SharedRuntime::generate_uncommon_trap_blob() {
|
||||
Label loop;
|
||||
__ bind(loop);
|
||||
__ movptr(rbx, Address(rsi, 0)); // Load frame size
|
||||
#ifdef CC_INTERP
|
||||
__ subptr(rbx, 4*wordSize); // we'll push pc and ebp by hand and
|
||||
#ifdef ASSERT
|
||||
__ push(0xDEADDEAD); // Make a recognizable pattern
|
||||
__ push(0xDEADDEAD); // (parm to RecursiveInterpreter...)
|
||||
#else /* ASSERT */
|
||||
__ subptr(rsp, 2*wordSize); // skip the "static long no_param"
|
||||
#endif /* ASSERT */
|
||||
#else /* CC_INTERP */
|
||||
__ subptr(rbx, 2*wordSize); // we'll push pc and rbp, by hand
|
||||
#endif /* CC_INTERP */
|
||||
__ pushptr(Address(rcx, 0)); // save return address
|
||||
__ enter(); // save old & set new rbp,
|
||||
__ subptr(rsp, rbx); // Prolog!
|
||||
__ movptr(rbx, sp_temp); // sender's sp
|
||||
#ifdef CC_INTERP
|
||||
__ movptr(Address(rbp,
|
||||
-(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))),
|
||||
rbx); // Make it walkable
|
||||
#else /* CC_INTERP */
|
||||
// This value is corrected by layout_activation_impl
|
||||
__ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD );
|
||||
__ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), rbx); // Make it walkable
|
||||
#endif /* CC_INTERP */
|
||||
__ movptr(sp_temp, rsp); // pass to next frame
|
||||
__ addptr(rsi, wordSize); // Bump array pointer (sizes)
|
||||
__ addptr(rcx, wordSize); // Bump array pointer (pcs)
|
||||
|
@ -3021,29 +3021,13 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
Label loop;
|
||||
__ bind(loop);
|
||||
__ movptr(rbx, Address(rsi, 0)); // Load frame size
|
||||
#ifdef CC_INTERP
|
||||
__ subptr(rbx, 4*wordSize); // we'll push pc and ebp by hand and
|
||||
#ifdef ASSERT
|
||||
__ push(0xDEADDEAD); // Make a recognizable pattern
|
||||
__ push(0xDEADDEAD);
|
||||
#else /* ASSERT */
|
||||
__ subptr(rsp, 2*wordSize); // skip the "static long no_param"
|
||||
#endif /* ASSERT */
|
||||
#else
|
||||
__ subptr(rbx, 2*wordSize); // We'll push pc and ebp by hand
|
||||
#endif // CC_INTERP
|
||||
__ pushptr(Address(rcx, 0)); // Save return address
|
||||
__ enter(); // Save old & set new ebp
|
||||
__ subptr(rsp, rbx); // Prolog
|
||||
#ifdef CC_INTERP
|
||||
__ movptr(Address(rbp,
|
||||
-(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))),
|
||||
sender_sp); // Make it walkable
|
||||
#else /* CC_INTERP */
|
||||
// This value is corrected by layout_activation_impl
|
||||
__ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD );
|
||||
__ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), sender_sp); // Make it walkable
|
||||
#endif /* CC_INTERP */
|
||||
__ mov(sender_sp, rsp); // Pass sender_sp to next frame
|
||||
__ addptr(rsi, wordSize); // Bump array pointer (sizes)
|
||||
__ addptr(rcx, wordSize); // Bump array pointer (pcs)
|
||||
@ -3242,16 +3226,10 @@ void SharedRuntime::generate_uncommon_trap_blob() {
|
||||
__ pushptr(Address(rcx, 0)); // Save return address
|
||||
__ enter(); // Save old & set new rbp
|
||||
__ subptr(rsp, rbx); // Prolog
|
||||
#ifdef CC_INTERP
|
||||
__ movptr(Address(rbp,
|
||||
-(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))),
|
||||
sender_sp); // Make it walkable
|
||||
#else // CC_INTERP
|
||||
__ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize),
|
||||
sender_sp); // Make it walkable
|
||||
// This value is corrected by layout_activation_impl
|
||||
__ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD );
|
||||
#endif // CC_INTERP
|
||||
__ mov(sender_sp, rsp); // Pass sender_sp to next frame
|
||||
__ addptr(rsi, wordSize); // Bump array pointer (sizes)
|
||||
__ addptr(rcx, wordSize); // Bump array pointer (pcs)
|
||||
|
@ -25,10 +25,10 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
@ -49,8 +49,6 @@
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
// Global Register Names
|
||||
static const Register rbcp = LP64_ONLY(r13) NOT_LP64(rsi);
|
||||
static const Register rlocals = LP64_ONLY(r14) NOT_LP64(rdi);
|
||||
@ -361,7 +359,7 @@ address TemplateInterpreterGenerator::generate_safept_entry_for(
|
||||
// rbx: method
|
||||
// rcx: invocation counter
|
||||
//
|
||||
void InterpreterGenerator::generate_counter_incr(
|
||||
void TemplateInterpreterGenerator::generate_counter_incr(
|
||||
Label* overflow,
|
||||
Label* profile_method,
|
||||
Label* profile_method_continue) {
|
||||
@ -436,7 +434,7 @@ void InterpreterGenerator::generate_counter_incr(
|
||||
}
|
||||
}
|
||||
|
||||
void InterpreterGenerator::generate_counter_overflow(Label* do_continue) {
|
||||
void TemplateInterpreterGenerator::generate_counter_overflow(Label& do_continue) {
|
||||
|
||||
// Asm interpreter on entry
|
||||
// r14/rdi - locals
|
||||
@ -466,7 +464,7 @@ void InterpreterGenerator::generate_counter_overflow(Label* do_continue) {
|
||||
__ movptr(rbx, Address(rbp, method_offset)); // restore Method*
|
||||
// Preserve invariant that r13/r14 contain bcp/locals of sender frame
|
||||
// and jump to the interpreted entry.
|
||||
__ jmp(*do_continue, relocInfo::none);
|
||||
__ jmp(do_continue, relocInfo::none);
|
||||
}
|
||||
|
||||
// See if we've got enough room on the stack for locals plus overhead.
|
||||
@ -483,7 +481,7 @@ void InterpreterGenerator::generate_counter_overflow(Label* do_continue) {
|
||||
//
|
||||
// Kills:
|
||||
// rax
|
||||
void InterpreterGenerator::generate_stack_overflow_check(void) {
|
||||
void TemplateInterpreterGenerator::generate_stack_overflow_check(void) {
|
||||
|
||||
// monitor entry size: see picture of stack in frame_x86.hpp
|
||||
const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
|
||||
@ -687,7 +685,7 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
|
||||
// End of helpers
|
||||
|
||||
// Method entry for java.lang.ref.Reference.get.
|
||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
address TemplateInterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
#if INCLUDE_ALL_GCS
|
||||
// Code: _aload_0, _getfield, _areturn
|
||||
// parameter size = 1
|
||||
@ -783,7 +781,7 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
// Interpreter stub for calling a native method. (asm interpreter)
|
||||
// This sets up a somewhat different looking stack for calling the
|
||||
// native method than the typical interpreter frame setup.
|
||||
address InterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
// determine code generation flags
|
||||
bool inc_counter = UseCompiler || CountCompiledCalls || LogTouchedMethods;
|
||||
|
||||
@ -1300,7 +1298,7 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
if (inc_counter) {
|
||||
// Handle overflow of counter and compile method
|
||||
__ bind(invocation_counter_overflow);
|
||||
generate_counter_overflow(&continue_after_compile);
|
||||
generate_counter_overflow(continue_after_compile);
|
||||
}
|
||||
|
||||
return entry_point;
|
||||
@ -1309,7 +1307,7 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
//
|
||||
// Generic interpreted method entry to (asm) interpreter
|
||||
//
|
||||
address InterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
// determine code generation flags
|
||||
bool inc_counter = UseCompiler || CountCompiledCalls || LogTouchedMethods;
|
||||
|
||||
@ -1471,7 +1469,7 @@ address InterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
}
|
||||
// Handle overflow of counter and compile method
|
||||
__ bind(invocation_counter_overflow);
|
||||
generate_counter_overflow(&continue_after_compile);
|
||||
generate_counter_overflow(continue_after_compile);
|
||||
}
|
||||
|
||||
return entry_point;
|
||||
@ -1767,18 +1765,6 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
|
||||
generate_and_dispatch(t);
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Generation of individual instructions
|
||||
|
||||
// helpers for generate_and_dispatch
|
||||
|
||||
|
||||
InterpreterGenerator::InterpreterGenerator(StubQueue* code)
|
||||
: TemplateInterpreterGenerator(code) {
|
||||
generate_all(); // down here so it can be "virtual"
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Non-product code
|
||||
@ -1871,4 +1857,3 @@ void TemplateInterpreterGenerator::stop_interpreter_at() {
|
||||
__ bind(L);
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
#endif // ! CC_INTERP
|
||||
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_X86_VM_TEMPLATEINTERPRETERGENERATOR_X86_HPP
|
||||
#define CPU_X86_VM_TEMPLATEINTERPRETERGENERATOR_X86_HPP
|
||||
|
||||
protected:
|
||||
|
||||
void generate_fixed_frame(bool native_call);
|
||||
|
||||
// address generate_asm_interpreter_entry(bool synchronized);
|
||||
|
||||
#endif // CPU_X86_VM_TEMPLATEINTERPRETERGENERATOR_X86_HPP
|
@ -24,20 +24,19 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
#include "runtime/arguments.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
/**
|
||||
* Method entry for static native methods:
|
||||
* int java.util.zip.CRC32.update(int crc, int b)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
address TemplateInterpreterGenerator::generate_CRC32_update_entry() {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
|
||||
@ -89,7 +88,7 @@ address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
* int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int len)
|
||||
* int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
|
||||
@ -155,7 +154,7 @@ address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpret
|
||||
* int java.util.zip.CRC32C.updateBytes(int crc, byte[] b, int off, int end)
|
||||
* int java.util.zip.CRC32C.updateByteBuffer(int crc, long address, int off, int end)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
address TemplateInterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
if (UseCRC32CIntrinsics) {
|
||||
address entry = __ pc();
|
||||
// Load parameters
|
||||
@ -201,7 +200,7 @@ address InterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpre
|
||||
* Method entry for static native method:
|
||||
* java.lang.Float.intBitsToFloat(int bits)
|
||||
*/
|
||||
address InterpreterGenerator::generate_Float_intBitsToFloat_entry() {
|
||||
address TemplateInterpreterGenerator::generate_Float_intBitsToFloat_entry() {
|
||||
if (UseSSE >= 1) {
|
||||
address entry = __ pc();
|
||||
|
||||
@ -227,7 +226,7 @@ address InterpreterGenerator::generate_Float_intBitsToFloat_entry() {
|
||||
* Method entry for static native method:
|
||||
* java.lang.Float.floatToRawIntBits(float value)
|
||||
*/
|
||||
address InterpreterGenerator::generate_Float_floatToRawIntBits_entry() {
|
||||
address TemplateInterpreterGenerator::generate_Float_floatToRawIntBits_entry() {
|
||||
if (UseSSE >= 1) {
|
||||
address entry = __ pc();
|
||||
|
||||
@ -254,7 +253,7 @@ address InterpreterGenerator::generate_Float_floatToRawIntBits_entry() {
|
||||
* Method entry for static native method:
|
||||
* java.lang.Double.longBitsToDouble(long bits)
|
||||
*/
|
||||
address InterpreterGenerator::generate_Double_longBitsToDouble_entry() {
|
||||
address TemplateInterpreterGenerator::generate_Double_longBitsToDouble_entry() {
|
||||
if (UseSSE >= 2) {
|
||||
address entry = __ pc();
|
||||
|
||||
@ -280,7 +279,7 @@ address InterpreterGenerator::generate_Double_longBitsToDouble_entry() {
|
||||
* Method entry for static native method:
|
||||
* java.lang.Double.doubleToRawLongBits(double value)
|
||||
*/
|
||||
address InterpreterGenerator::generate_Double_doubleToRawLongBits_entry() {
|
||||
address TemplateInterpreterGenerator::generate_Double_doubleToRawLongBits_entry() {
|
||||
if (UseSSE >= 2) {
|
||||
address entry = __ pc();
|
||||
|
||||
@ -302,4 +301,3 @@ address InterpreterGenerator::generate_Double_doubleToRawLongBits_entry() {
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
@ -24,19 +24,18 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
#include "runtime/arguments.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
/**
|
||||
* Method entry for static native methods:
|
||||
* int java.util.zip.CRC32.update(int crc, int b)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
address TemplateInterpreterGenerator::generate_CRC32_update_entry() {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
|
||||
@ -88,7 +87,7 @@ address InterpreterGenerator::generate_CRC32_update_entry() {
|
||||
* int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int len)
|
||||
* int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
if (UseCRC32Intrinsics) {
|
||||
address entry = __ pc();
|
||||
|
||||
@ -149,7 +148,7 @@ address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpret
|
||||
* int java.util.zip.CRC32C.updateBytes(int crc, byte[] b, int off, int end)
|
||||
* int java.util.zip.CRC32C.updateByteBuffer(int crc, long address, int off, int end)
|
||||
*/
|
||||
address InterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
address TemplateInterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
|
||||
if (UseCRC32CIntrinsics) {
|
||||
address entry = __ pc();
|
||||
// Load parameters
|
||||
@ -194,4 +193,3 @@ address InterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpre
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif // ! CC_INTERP
|
||||
|
@ -27,7 +27,16 @@
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
// Size of interpreter code. Increase if too small. Interpreter will
|
||||
// fail with a guarantee ("not enough space for interpreter generation");
|
||||
// if too small.
|
||||
// Run with +PrintInterpreter to get the VM to print out the size.
|
||||
// Max size with JVMTI
|
||||
#ifdef AMD64
|
||||
int TemplateInterpreter::InterpreterCodeSize = 256 * 1024;
|
||||
#else
|
||||
int TemplateInterpreter::InterpreterCodeSize = 224 * 1024;
|
||||
#endif // AMD64
|
||||
|
||||
// asm based interpreter deoptimization helpers
|
||||
int AbstractInterpreter::size_activation(int max_stack,
|
||||
@ -38,7 +47,7 @@ int AbstractInterpreter::size_activation(int max_stack,
|
||||
int callee_locals,
|
||||
bool is_top_frame) {
|
||||
// Note: This calculation must exactly parallel the frame setup
|
||||
// in InterpreterGenerator::generate_fixed_frame.
|
||||
// in TemplateInterpreterGenerator::generate_fixed_frame.
|
||||
|
||||
// fixed size of an interpreter frame:
|
||||
int overhead = frame::sender_sp_offset -
|
||||
@ -198,5 +207,3 @@ int AbstractInterpreter::size_top_interpreter_activation(Method* method) {
|
||||
Interpreter::stackElementWords;
|
||||
return (overhead_size + method_stack + stub_code);
|
||||
}
|
||||
|
||||
#endif // CC_INTERP
|
||||
|
@ -1,42 +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.
|
||||
*
|
||||
* 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_X86_VM_TEMPLATEINTERPRETER_X86_HPP
|
||||
#define CPU_X86_VM_TEMPLATEINTERPRETER_X86_HPP
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Size of interpreter code. Increase if too small. Interpreter will
|
||||
// fail with a guarantee ("not enough space for interpreter generation");
|
||||
// if too small.
|
||||
// Run with +PrintInterpreter to get the VM to print out the size.
|
||||
// Max size with JVMTI
|
||||
#ifdef AMD64
|
||||
const static int InterpreterCodeSize = 256 * 1024;
|
||||
#else
|
||||
const static int InterpreterCodeSize = 224 * 1024;
|
||||
#endif // AMD64
|
||||
|
||||
#endif // CPU_X86_VM_TEMPLATEINTERPRETER_X86_HPP
|
@ -38,8 +38,6 @@
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
#ifndef CC_INTERP
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
// Global Register Names
|
||||
@ -4341,5 +4339,3 @@ void TemplateTable::multianewarray() {
|
||||
__ load_unsigned_byte(rbx, at_bcp(3));
|
||||
__ lea(rsp, Address(rsp, rbx, Interpreter::stackElementScale())); // get rid of counts
|
||||
}
|
||||
#endif /* !CC_INTERP */
|
||||
|
||||
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2008, 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.
|
||||
*
|
||||
* 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_ZERO_VM_CPPINTERPRETERGENERATOR_ZERO_HPP
|
||||
#define CPU_ZERO_VM_CPPINTERPRETERGENERATOR_ZERO_HPP
|
||||
|
||||
protected:
|
||||
MacroAssembler* assembler() const {
|
||||
return _masm;
|
||||
}
|
||||
|
||||
public:
|
||||
static address generate_entry_impl(MacroAssembler* masm, address entry_point) {
|
||||
ZeroEntry *entry = (ZeroEntry *) masm->pc();
|
||||
masm->advance(sizeof(ZeroEntry));
|
||||
entry->set_entry_point(entry_point);
|
||||
return (address) entry;
|
||||
}
|
||||
|
||||
protected:
|
||||
address generate_entry(address entry_point) {
|
||||
return generate_entry_impl(assembler(), entry_point);
|
||||
}
|
||||
|
||||
#endif // CPU_ZERO_VM_CPPINTERPRETERGENERATOR_ZERO_HPP
|
@ -27,8 +27,8 @@
|
||||
#include "asm/assembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/cppInterpreter.hpp"
|
||||
#include "interpreter/cppInterpreterGenerator.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
@ -788,21 +788,21 @@ BasicType CppInterpreter::result_type_of(Method* method) {
|
||||
return t;
|
||||
}
|
||||
|
||||
address InterpreterGenerator::generate_empty_entry() {
|
||||
address CppInterpreterGenerator::generate_empty_entry() {
|
||||
if (!UseFastEmptyMethods)
|
||||
return NULL;
|
||||
|
||||
return generate_entry((address) CppInterpreter::empty_entry);
|
||||
}
|
||||
|
||||
address InterpreterGenerator::generate_accessor_entry() {
|
||||
address CppInterpreterGenerator::generate_accessor_entry() {
|
||||
if (!UseFastAccessorMethods)
|
||||
return NULL;
|
||||
|
||||
return generate_entry((address) CppInterpreter::accessor_entry);
|
||||
}
|
||||
|
||||
address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
address CppInterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
#if INCLUDE_ALL_GCS
|
||||
if (UseG1GC) {
|
||||
// We need to generate have a routine that generates code to:
|
||||
@ -822,20 +822,15 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
address InterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
address CppInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
return generate_entry((address) CppInterpreter::native_entry);
|
||||
}
|
||||
|
||||
address InterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
address CppInterpreterGenerator::generate_normal_entry(bool synchronized) {
|
||||
return generate_entry((address) CppInterpreter::normal_entry);
|
||||
}
|
||||
|
||||
|
||||
InterpreterGenerator::InterpreterGenerator(StubQueue* code)
|
||||
: CppInterpreterGenerator(code) {
|
||||
generate_all();
|
||||
}
|
||||
|
||||
// Deoptimization helpers
|
||||
|
||||
InterpreterFrame *InterpreterFrame::build(int size, TRAPS) {
|
||||
@ -980,31 +975,4 @@ int AbstractInterpreter::size_top_interpreter_activation(Method* method) {
|
||||
bool CppInterpreter::contains(address pc) {
|
||||
return false; // make frame::print_value_on work
|
||||
}
|
||||
|
||||
// Result handlers and convertors
|
||||
|
||||
address CppInterpreterGenerator::generate_result_handler_for(
|
||||
BasicType type) {
|
||||
assembler()->advance(1);
|
||||
return ShouldNotCallThisStub();
|
||||
}
|
||||
|
||||
address CppInterpreterGenerator::generate_tosca_to_stack_converter(
|
||||
BasicType type) {
|
||||
assembler()->advance(1);
|
||||
return ShouldNotCallThisStub();
|
||||
}
|
||||
|
||||
address CppInterpreterGenerator::generate_stack_to_stack_converter(
|
||||
BasicType type) {
|
||||
assembler()->advance(1);
|
||||
return ShouldNotCallThisStub();
|
||||
}
|
||||
|
||||
address CppInterpreterGenerator::generate_stack_to_native_abi_converter(
|
||||
BasicType type) {
|
||||
assembler()->advance(1);
|
||||
return ShouldNotCallThisStub();
|
||||
}
|
||||
|
||||
#endif // CC_INTERP
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -122,6 +122,11 @@ inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_tos_address() const {
|
||||
return get_interpreterState()->_stack + 1;
|
||||
}
|
||||
|
||||
inline oop* frame::interpreter_frame_temp_oop_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return (oop *)&istate->_oop_temp;
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
||||
inline int frame::interpreter_frame_monitor_size() {
|
||||
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2007 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.
|
||||
*
|
||||
* 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_ZERO_VM_INTERPRETERGENERATOR_ZERO_HPP
|
||||
#define CPU_ZERO_VM_INTERPRETERGENERATOR_ZERO_HPP
|
||||
|
||||
// Generation of Interpreter
|
||||
//
|
||||
friend class AbstractInterpreterGenerator;
|
||||
|
||||
private:
|
||||
address generate_normal_entry(bool synchronized);
|
||||
address generate_native_entry(bool synchronized);
|
||||
address generate_abstract_entry();
|
||||
address generate_math_entry(AbstractInterpreter::MethodKind kind);
|
||||
address generate_empty_entry();
|
||||
address generate_accessor_entry();
|
||||
address generate_Reference_get_entry();
|
||||
|
||||
// Not supported
|
||||
address generate_CRC32_update_entry() { return NULL; }
|
||||
address generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) { return NULL; }
|
||||
address generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) { return NULL; }
|
||||
#endif // CPU_ZERO_VM_INTERPRETERGENERATOR_ZERO_HPP
|
@ -26,8 +26,8 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/cppInterpreterGenerator.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
@ -57,7 +57,7 @@ address AbstractInterpreterGenerator::generate_slow_signature_handler() {
|
||||
return (address) InterpreterRuntime::slow_signature_handler;
|
||||
}
|
||||
|
||||
address InterpreterGenerator::generate_math_entry(
|
||||
address CppInterpreterGenerator::generate_math_entry(
|
||||
AbstractInterpreter::MethodKind kind) {
|
||||
if (!InlineIntrinsics)
|
||||
return NULL;
|
||||
@ -66,7 +66,7 @@ address InterpreterGenerator::generate_math_entry(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
address InterpreterGenerator::generate_abstract_entry() {
|
||||
address CppInterpreterGenerator::generate_abstract_entry() {
|
||||
return generate_entry((address) ShouldNotCallThisEntry());
|
||||
}
|
||||
|
||||
|
@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2007, 2008 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.
|
||||
*
|
||||
* 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_ZERO_VM_INTERPRETER_ZERO_HPP
|
||||
#define CPU_ZERO_VM_INTERPRETER_ZERO_HPP
|
||||
|
||||
public:
|
||||
static void invoke_method(Method* method, address entry_point, TRAPS) {
|
||||
((ZeroEntry *) entry_point)->invoke(method, THREAD);
|
||||
}
|
||||
static void invoke_osr(Method* method,
|
||||
address entry_point,
|
||||
address osr_buf,
|
||||
TRAPS) {
|
||||
((ZeroEntry *) entry_point)->invoke_osr(method, osr_buf, THREAD);
|
||||
}
|
||||
|
||||
public:
|
||||
static int expr_index_at(int i) {
|
||||
return stackElementWords * i;
|
||||
}
|
||||
|
||||
static int expr_offset_in_bytes(int i) {
|
||||
return stackElementSize * i;
|
||||
}
|
||||
|
||||
static int local_index_at(int i) {
|
||||
assert(i <= 0, "local direction already negated");
|
||||
return stackElementWords * i;
|
||||
}
|
||||
|
||||
#endif // CPU_ZERO_VM_INTERPRETER_ZERO_HPP
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/cppInterpreterGenerator.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
@ -167,16 +167,16 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
|
||||
// Perhaps surprisingly, the symbolic references visible to Java are not directly used.
|
||||
// They are linked to Java-generated adapters via MethodHandleNatives.linkMethod.
|
||||
// They all allow an appendix argument.
|
||||
return InterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_invalid);
|
||||
return CppInterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_invalid);
|
||||
case vmIntrinsics::_invokeBasic:
|
||||
return InterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_invokeBasic);
|
||||
return CppInterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_invokeBasic);
|
||||
case vmIntrinsics::_linkToStatic:
|
||||
case vmIntrinsics::_linkToSpecial:
|
||||
return InterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_linkToStaticOrSpecial);
|
||||
return CppInterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_linkToStaticOrSpecial);
|
||||
case vmIntrinsics::_linkToInterface:
|
||||
return InterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_linkToInterface);
|
||||
return CppInterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_linkToInterface);
|
||||
case vmIntrinsics::_linkToVirtual:
|
||||
return InterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_linkToVirtual);
|
||||
return CppInterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_linkToVirtual);
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, 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.
|
||||
*
|
||||
* 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_ZERO_VM_TEMPLATEINTERPRETERGENERATOR_ZERO_HPP
|
||||
#define CPU_ZERO_VM_TEMPLATEINTERPRETERGENERATOR_ZERO_HPP
|
||||
|
||||
// This file is intentionally empty
|
||||
|
||||
#endif // CPU_ZERO_VM_TEMPLATEINTERPRETERGENERATOR_ZERO_HPP
|
@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, 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.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/assembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "prims/jvmtiExport.hpp"
|
||||
#include "prims/jvmtiThreadState.hpp"
|
||||
#include "runtime/arguments.hpp"
|
||||
#include "runtime/deoptimization.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "runtime/timer.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
|
||||
// This file is intentionally empty
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, 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.
|
||||
*
|
||||
* 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_ZERO_VM_TEMPLATEINTERPRETER_ZERO_HPP
|
||||
#define CPU_ZERO_VM_TEMPLATEINTERPRETER_ZERO_HPP
|
||||
|
||||
// This file is intentionally empty
|
||||
|
||||
#endif // CPU_ZERO_VM_TEMPLATEINTERPRETER_ZERO_HPP
|
@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, 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.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "prims/methodHandles.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
|
||||
// This file is intentionally empty
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, 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.
|
||||
*
|
||||
* 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_ZERO_VM_TEMPLATETABLE_ZERO_HPP
|
||||
#define CPU_ZERO_VM_TEMPLATETABLE_ZERO_HPP
|
||||
|
||||
// This file is intentionally empty
|
||||
|
||||
#endif // CPU_ZERO_VM_TEMPLATETABLE_ZERO_HPP
|
@ -48,22 +48,13 @@
|
||||
// Also code for populating interpreter
|
||||
// frames created during deoptimization.
|
||||
//
|
||||
// For both template and c++ interpreter. There are common files for aspects of the interpreter
|
||||
// that are generic to both interpreters. This is the layout:
|
||||
//
|
||||
// abstractInterpreter.hpp: generic description of the interpreter.
|
||||
// interpreter*: generic frame creation and handling.
|
||||
//
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------
|
||||
// The C++ interface to the bytecode interpreter(s).
|
||||
|
||||
class InterpreterMacroAssembler;
|
||||
|
||||
class AbstractInterpreter: AllStatic {
|
||||
friend class VMStructs;
|
||||
friend class Interpreter;
|
||||
friend class CppInterpreterGenerator;
|
||||
friend class TemplateInterpreterGenerator;
|
||||
public:
|
||||
enum MethodKind {
|
||||
zerolocals, // method needs locals initialization
|
||||
@ -128,7 +119,6 @@ class AbstractInterpreter: AllStatic {
|
||||
static address _rethrow_exception_entry; // rethrows an activation in previous frame
|
||||
|
||||
friend class AbstractInterpreterGenerator;
|
||||
friend class InterpreterGenerator;
|
||||
friend class InterpreterMacroAssembler;
|
||||
|
||||
public:
|
||||
@ -213,6 +203,29 @@ class AbstractInterpreter: AllStatic {
|
||||
const static int stackElementSize = stackElementWords * wordSize;
|
||||
const static int logStackElementSize = LogBytesPerWord;
|
||||
|
||||
static int expr_index_at(int i) {
|
||||
return stackElementWords * i;
|
||||
}
|
||||
|
||||
static int expr_offset_in_bytes(int i) {
|
||||
#if !defined(ZERO) && (defined(PPC) || defined(SPARC))
|
||||
return stackElementSize * i + wordSize; // both point to one word past TOS
|
||||
#else
|
||||
return stackElementSize * i;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int local_index_at(int i) {
|
||||
assert(i <= 0, "local direction already negated");
|
||||
return stackElementWords * i;
|
||||
}
|
||||
|
||||
#if !defined(ZERO) && (defined(IA32) || defined(AMD64))
|
||||
static Address::ScaleFactor stackElementScale() {
|
||||
return NOT_LP64(Address::times_4) LP64_ONLY(Address::times_8);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Local values relative to locals[n]
|
||||
static int local_offset_in_bytes(int n) {
|
||||
return ((frame::interpreter_frame_expression_stack_direction() * n) * stackElementSize);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -59,7 +59,6 @@ class BytecodeHistogram: AllStatic {
|
||||
NOT_PRODUCT(static int _counters[Bytecodes::number_of_codes];) // a counter for each bytecode
|
||||
|
||||
friend class TemplateInterpreterGenerator;
|
||||
friend class InterpreterGenerator;
|
||||
friend class BytecodeInterpreter;
|
||||
|
||||
public:
|
||||
@ -87,7 +86,6 @@ class BytecodePairHistogram: AllStatic {
|
||||
NOT_PRODUCT(static int _counters[number_of_pairs];) // a counter for each pair
|
||||
|
||||
friend class TemplateInterpreterGenerator;
|
||||
friend class InterpreterGenerator;
|
||||
|
||||
public:
|
||||
// Initialization
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 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
|
||||
@ -79,7 +79,6 @@ class BytecodeInterpreter : StackObj {
|
||||
friend class SharedRuntime;
|
||||
friend class AbstractInterpreterGenerator;
|
||||
friend class CppInterpreterGenerator;
|
||||
friend class InterpreterGenerator;
|
||||
friend class InterpreterMacroAssembler;
|
||||
friend class frame;
|
||||
friend class VMStructs;
|
||||
@ -572,24 +571,10 @@ static const char* C_msg(BytecodeInterpreter::messages msg);
|
||||
void print();
|
||||
#endif // PRODUCT
|
||||
|
||||
// Platform fields/methods
|
||||
#ifdef TARGET_ARCH_x86
|
||||
# include "bytecodeInterpreter_x86.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "bytecodeInterpreter_sparc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytecodeInterpreter_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytecodeInterpreter_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytecodeInterpreter_ppc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_aarch64
|
||||
# include "bytecodeInterpreter_aarch64.hpp"
|
||||
#else
|
||||
#error "Only Zero Bytecode Interpreter is supported"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 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
|
||||
@ -42,24 +42,10 @@
|
||||
#define VERIFY_OOP(o)
|
||||
#endif
|
||||
|
||||
// Platform dependent data manipulation
|
||||
#ifdef TARGET_ARCH_x86
|
||||
# include "bytecodeInterpreter_x86.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "bytecodeInterpreter_sparc.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "bytecodeInterpreter_zero.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "bytecodeInterpreter_arm.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "bytecodeInterpreter_ppc.inline.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_aarch64
|
||||
# include "bytecodeInterpreter_aarch64.inline.hpp"
|
||||
#else
|
||||
#error "Only Zero Bytecode Interpreter is supported"
|
||||
#endif
|
||||
|
||||
#endif // CC_INTERP
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -24,12 +24,17 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "interpreter/bytecodeInterpreter.hpp"
|
||||
#include "interpreter/cppInterpreterGenerator.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
|
||||
#ifdef CC_INTERP
|
||||
# define __ _masm->
|
||||
|
||||
#ifdef ZERO
|
||||
# include "entry_zero.hpp"
|
||||
#else
|
||||
#error "Only Zero CppInterpreter is supported"
|
||||
#endif
|
||||
|
||||
void CppInterpreter::initialize() {
|
||||
if (_code != NULL) return;
|
||||
@ -42,7 +47,7 @@ void CppInterpreter::initialize() {
|
||||
NOT_PRODUCT(code_size *= 4;) // debug uses extra interpreter code space
|
||||
_code = new StubQueue(new InterpreterCodeletInterface, code_size, NULL,
|
||||
"Interpreter");
|
||||
InterpreterGenerator g(_code);
|
||||
CppInterpreterGenerator g(_code);
|
||||
if (PrintInterpreter) print();
|
||||
}
|
||||
|
||||
@ -56,11 +61,20 @@ void CppInterpreter::initialize() {
|
||||
}
|
||||
|
||||
|
||||
address CppInterpreter::_tosca_to_stack [AbstractInterpreter::number_of_result_handlers];
|
||||
address CppInterpreter::_stack_to_stack [AbstractInterpreter::number_of_result_handlers];
|
||||
address CppInterpreter::_stack_to_native_abi [AbstractInterpreter::number_of_result_handlers];
|
||||
void CppInterpreter::invoke_method(Method* method, address entry_point, TRAPS) {
|
||||
((ZeroEntry *) entry_point)->invoke(method, THREAD);
|
||||
}
|
||||
|
||||
void CppInterpreter::invoke_osr(Method* method,
|
||||
address entry_point,
|
||||
address osr_buf,
|
||||
TRAPS) {
|
||||
((ZeroEntry *) entry_point)->invoke_osr(method, osr_buf, THREAD);
|
||||
}
|
||||
|
||||
|
||||
CppInterpreterGenerator::CppInterpreterGenerator(StubQueue* _code): AbstractInterpreterGenerator(_code) {
|
||||
generate_all();
|
||||
}
|
||||
|
||||
static const BasicType types[Interpreter::number_of_result_handlers] = {
|
||||
@ -79,36 +93,8 @@ static const BasicType types[Interpreter::number_of_result_handlers] = {
|
||||
void CppInterpreterGenerator::generate_all() {
|
||||
AbstractInterpreterGenerator::generate_all();
|
||||
|
||||
{ CodeletMark cm(_masm, "result handlers for native calls");
|
||||
// The various result converter stublets.
|
||||
int is_generated[Interpreter::number_of_result_handlers];
|
||||
memset(is_generated, 0, sizeof(is_generated));
|
||||
int _tosca_to_stack_is_generated[Interpreter::number_of_result_handlers];
|
||||
int _stack_to_stack_is_generated[Interpreter::number_of_result_handlers];
|
||||
int _stack_to_native_abi_is_generated[Interpreter::number_of_result_handlers];
|
||||
|
||||
memset(_tosca_to_stack_is_generated, 0, sizeof(_tosca_to_stack_is_generated));
|
||||
memset(_stack_to_stack_is_generated, 0, sizeof(_stack_to_stack_is_generated));
|
||||
memset(_stack_to_native_abi_is_generated, 0, sizeof(_stack_to_native_abi_is_generated));
|
||||
for (int i = 0; i < Interpreter::number_of_result_handlers; i++) {
|
||||
BasicType type = types[i];
|
||||
if (!is_generated[Interpreter::BasicType_as_index(type)]++) {
|
||||
Interpreter::_native_abi_to_tosca[Interpreter::BasicType_as_index(type)] = generate_result_handler_for(type);
|
||||
}
|
||||
if (!_tosca_to_stack_is_generated[Interpreter::BasicType_as_index(type)]++) {
|
||||
Interpreter::_tosca_to_stack[Interpreter::BasicType_as_index(type)] = generate_tosca_to_stack_converter(type);
|
||||
}
|
||||
if (!_stack_to_stack_is_generated[Interpreter::BasicType_as_index(type)]++) {
|
||||
Interpreter::_stack_to_stack[Interpreter::BasicType_as_index(type)] = generate_stack_to_stack_converter(type);
|
||||
}
|
||||
if (!_stack_to_native_abi_is_generated[Interpreter::BasicType_as_index(type)]++) {
|
||||
Interpreter::_stack_to_native_abi[Interpreter::BasicType_as_index(type)] = generate_stack_to_native_abi_converter(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define method_entry(kind) Interpreter::_entry_table[Interpreter::kind] = ((InterpreterGenerator*)this)->generate_method_entry(Interpreter::kind)
|
||||
#define method_entry(kind) Interpreter::_entry_table[Interpreter::kind] = generate_method_entry(Interpreter::kind)
|
||||
|
||||
{ CodeletMark cm(_masm, "(kind = frame_manager)");
|
||||
// all non-native method kinds
|
||||
@ -138,7 +124,63 @@ void CppInterpreterGenerator::generate_all() {
|
||||
|
||||
|
||||
#undef method_entry
|
||||
|
||||
}
|
||||
|
||||
InterpreterCodelet* CppInterpreter::codelet_containing(address pc) {
|
||||
// FIXME: I'm pretty sure _code is null and this is never called, which is why it's copied.
|
||||
return (InterpreterCodelet*)_code->stub_containing(pc);
|
||||
}
|
||||
|
||||
// Generate method entries
|
||||
address CppInterpreterGenerator::generate_method_entry(
|
||||
AbstractInterpreter::MethodKind kind) {
|
||||
// determine code generation flags
|
||||
bool native = false;
|
||||
bool synchronized = false;
|
||||
address entry_point = NULL;
|
||||
|
||||
switch (kind) {
|
||||
case Interpreter::zerolocals : break;
|
||||
case Interpreter::zerolocals_synchronized: synchronized = true; break;
|
||||
case Interpreter::native : native = true; break;
|
||||
case Interpreter::native_synchronized : native = true; synchronized = true; break;
|
||||
case Interpreter::empty : entry_point = generate_empty_entry(); break;
|
||||
case Interpreter::accessor : entry_point = generate_accessor_entry(); break;
|
||||
case Interpreter::abstract : entry_point = generate_abstract_entry(); break;
|
||||
|
||||
case Interpreter::java_lang_math_sin : // fall thru
|
||||
case Interpreter::java_lang_math_cos : // fall thru
|
||||
case Interpreter::java_lang_math_tan : // fall thru
|
||||
case Interpreter::java_lang_math_abs : // fall thru
|
||||
case Interpreter::java_lang_math_log : // fall thru
|
||||
case Interpreter::java_lang_math_log10 : // fall thru
|
||||
case Interpreter::java_lang_math_sqrt : // fall thru
|
||||
case Interpreter::java_lang_math_pow : // fall thru
|
||||
case Interpreter::java_lang_math_exp : entry_point = generate_math_entry(kind); break;
|
||||
case Interpreter::java_lang_ref_reference_get
|
||||
: entry_point = generate_Reference_get_entry(); break;
|
||||
default:
|
||||
fatal("unexpected method kind: %d", kind);
|
||||
break;
|
||||
}
|
||||
|
||||
if (entry_point) {
|
||||
return entry_point;
|
||||
}
|
||||
|
||||
// We expect the normal and native entry points to be generated first so we can reuse them.
|
||||
if (native) {
|
||||
entry_point = Interpreter::entry_for_kind(synchronized ? Interpreter::native_synchronized : Interpreter::native);
|
||||
if (entry_point == NULL) {
|
||||
entry_point = generate_native_entry(synchronized);
|
||||
}
|
||||
} else {
|
||||
entry_point = Interpreter::entry_for_kind(synchronized ? Interpreter::zerolocals_synchronized : Interpreter::zerolocals);
|
||||
if (entry_point == NULL) {
|
||||
entry_point = generate_normal_entry(synchronized);
|
||||
}
|
||||
}
|
||||
|
||||
return entry_point;
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -26,40 +26,24 @@
|
||||
#define SHARE_VM_INTERPRETER_CPPINTERPRETER_HPP
|
||||
|
||||
#include "interpreter/abstractInterpreter.hpp"
|
||||
|
||||
#ifdef CC_INTERP
|
||||
|
||||
class InterpreterCodelet;
|
||||
|
||||
// This file contains the platform-independent parts
|
||||
// of the c++ interpreter
|
||||
|
||||
class CppInterpreter: public AbstractInterpreter {
|
||||
friend class VMStructs;
|
||||
friend class Interpreter; // contains()
|
||||
friend class InterpreterGenerator; // result handlers
|
||||
friend class CppInterpreterGenerator; // result handlers
|
||||
public:
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// tosca result -> stack result
|
||||
static address _tosca_to_stack[number_of_result_handlers]; // converts tosca to C++ interpreter stack result
|
||||
// stack result -> stack result
|
||||
static address _stack_to_stack[number_of_result_handlers]; // pass result between C++ interpreter calls
|
||||
// stack result -> native abi result
|
||||
static address _stack_to_native_abi[number_of_result_handlers]; // converts C++ interpreter results to native abi
|
||||
|
||||
// this is to allow frame and only frame to use contains().
|
||||
friend class frame;
|
||||
|
||||
public:
|
||||
// Initialization/debugging
|
||||
static void initialize();
|
||||
// this only returns whether a pc is within generated code for the interpreter.
|
||||
|
||||
// This is a moderately dubious interface for the c++ interpreter. Only
|
||||
// These are moderately dubious interfaces for the c++ interpreter. Only
|
||||
// frame code and debug.cpp should be using it.
|
||||
static bool contains(address pc);
|
||||
static InterpreterCodelet* codelet_containing(address pc);
|
||||
|
||||
public:
|
||||
|
||||
@ -68,38 +52,17 @@ class CppInterpreter: public AbstractInterpreter {
|
||||
static void notice_safepoints() {}
|
||||
static void ignore_safepoints() {}
|
||||
|
||||
static address native_result_to_tosca() { return (address)_native_abi_to_tosca; } // aka result handler
|
||||
static address tosca_result_to_stack() { return (address)_tosca_to_stack; }
|
||||
static address stack_result_to_stack() { return (address)_stack_to_stack; }
|
||||
static address stack_result_to_native() { return (address)_stack_to_native_abi; }
|
||||
|
||||
static address native_result_to_tosca(int index) { return _native_abi_to_tosca[index]; } // aka result handler
|
||||
static address tosca_result_to_stack(int index) { return _tosca_to_stack[index]; }
|
||||
static address stack_result_to_stack(int index) { return _stack_to_stack[index]; }
|
||||
static address stack_result_to_native(int index) { return _stack_to_native_abi[index]; }
|
||||
|
||||
static address return_entry (TosState state, int length, Bytecodes::Code code);
|
||||
static address deopt_entry (TosState state, int length);
|
||||
|
||||
#ifdef TARGET_ARCH_x86
|
||||
# include "cppInterpreter_x86.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "cppInterpreter_sparc.hpp"
|
||||
#endif
|
||||
static void invoke_method(Method* method, address entry_point, TRAPS);
|
||||
static void invoke_osr(Method* method,
|
||||
address entry_point,
|
||||
address osr_buf,
|
||||
TRAPS);
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "cppInterpreter_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "cppInterpreter_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "cppInterpreter_ppc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_aarch64
|
||||
# include "cppInterpreter_aarch64.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 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
|
||||
@ -29,46 +29,48 @@
|
||||
// of the template interpreter generator.
|
||||
|
||||
#ifdef CC_INTERP
|
||||
#ifdef TARGET_ARCH_zero
|
||||
#ifdef ZERO
|
||||
# include "entry_zero.hpp"
|
||||
# include "interpreter/interp_masm.hpp"
|
||||
#endif
|
||||
|
||||
class CppInterpreterGenerator: public AbstractInterpreterGenerator {
|
||||
protected:
|
||||
// shared code sequences
|
||||
// Converter for native abi result to tosca result
|
||||
address generate_result_handler_for(BasicType type);
|
||||
address generate_tosca_to_stack_converter(BasicType type);
|
||||
address generate_stack_to_stack_converter(BasicType type);
|
||||
address generate_stack_to_native_abi_converter(BasicType type);
|
||||
|
||||
private:
|
||||
void generate_all();
|
||||
|
||||
address generate_method_entry(AbstractInterpreter::MethodKind kind);
|
||||
address generate_normal_entry(bool synchronized);
|
||||
address generate_native_entry(bool synchronized);
|
||||
address generate_abstract_entry();
|
||||
address generate_math_entry(AbstractInterpreter::MethodKind kind);
|
||||
address generate_empty_entry();
|
||||
address generate_accessor_entry();
|
||||
address generate_Reference_get_entry();
|
||||
|
||||
public:
|
||||
CppInterpreterGenerator(StubQueue* _code);
|
||||
|
||||
#ifdef TARGET_ARCH_x86
|
||||
# include "cppInterpreterGenerator_x86.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "cppInterpreterGenerator_sparc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "cppInterpreterGenerator_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "cppInterpreterGenerator_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "cppInterpreterGenerator_ppc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_aarch64
|
||||
# include "cppInterpreterGenerator_aarch64.hpp"
|
||||
#endif
|
||||
#ifdef ZERO
|
||||
protected:
|
||||
MacroAssembler* assembler() const {
|
||||
return _masm;
|
||||
}
|
||||
|
||||
public:
|
||||
static address generate_entry_impl(MacroAssembler* masm, address entry_point) {
|
||||
ZeroEntry *entry = (ZeroEntry *) masm->pc();
|
||||
masm->advance(sizeof(ZeroEntry));
|
||||
entry->set_entry_point(entry_point);
|
||||
return (address) entry;
|
||||
}
|
||||
|
||||
protected:
|
||||
address generate_entry(address entry_point) {
|
||||
return generate_entry_impl(assembler(), entry_point);
|
||||
}
|
||||
#endif // ZERO
|
||||
};
|
||||
|
||||
#endif // CC_INTERP
|
||||
|
||||
#endif // SHARE_VM_INTERPRETER_CPPINTERPRETERGENERATOR_HPP
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/bytecodeInterpreter.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterGenerator.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateTable.hpp"
|
||||
@ -282,7 +281,7 @@ AbstractInterpreter::MethodKind AbstractInterpreter::method_kind(methodHandle m)
|
||||
// Special intrinsic method?
|
||||
// Note: This test must come _after_ the test for native methods,
|
||||
// otherwise we will run into problems with JDK 1.2, see also
|
||||
// InterpreterGenerator::generate_method_entry() for
|
||||
// TemplateInterpreterGenerator::generate_method_entry() for
|
||||
// for details.
|
||||
switch (m->intrinsic_id()) {
|
||||
case vmIntrinsics::_dsin : return java_lang_math_sin ;
|
||||
@ -548,87 +547,3 @@ void AbstractInterpreterGenerator::initialize_method_handle_entries() {
|
||||
Interpreter::_entry_table[kind] = Interpreter::_entry_table[Interpreter::abstract];
|
||||
}
|
||||
}
|
||||
|
||||
// Generate method entries
|
||||
address InterpreterGenerator::generate_method_entry(
|
||||
AbstractInterpreter::MethodKind kind) {
|
||||
// determine code generation flags
|
||||
bool native = false;
|
||||
bool synchronized = false;
|
||||
address entry_point = NULL;
|
||||
|
||||
switch (kind) {
|
||||
case Interpreter::zerolocals : break;
|
||||
case Interpreter::zerolocals_synchronized: synchronized = true; break;
|
||||
case Interpreter::native : native = true; break;
|
||||
case Interpreter::native_synchronized : native = true; synchronized = true; break;
|
||||
case Interpreter::empty : entry_point = generate_empty_entry(); break;
|
||||
case Interpreter::accessor : entry_point = generate_accessor_entry(); break;
|
||||
case Interpreter::abstract : entry_point = generate_abstract_entry(); break;
|
||||
|
||||
case Interpreter::java_lang_math_sin : // fall thru
|
||||
case Interpreter::java_lang_math_cos : // fall thru
|
||||
case Interpreter::java_lang_math_tan : // fall thru
|
||||
case Interpreter::java_lang_math_abs : // fall thru
|
||||
case Interpreter::java_lang_math_log : // fall thru
|
||||
case Interpreter::java_lang_math_log10 : // fall thru
|
||||
case Interpreter::java_lang_math_sqrt : // fall thru
|
||||
case Interpreter::java_lang_math_pow : // fall thru
|
||||
case Interpreter::java_lang_math_exp : entry_point = generate_math_entry(kind); break;
|
||||
case Interpreter::java_lang_ref_reference_get
|
||||
: entry_point = generate_Reference_get_entry(); break;
|
||||
#ifndef CC_INTERP
|
||||
case Interpreter::java_util_zip_CRC32_update
|
||||
: native = true; entry_point = generate_CRC32_update_entry(); break;
|
||||
case Interpreter::java_util_zip_CRC32_updateBytes
|
||||
: // fall thru
|
||||
case Interpreter::java_util_zip_CRC32_updateByteBuffer
|
||||
: native = true; entry_point = generate_CRC32_updateBytes_entry(kind); break;
|
||||
case Interpreter::java_util_zip_CRC32C_updateBytes
|
||||
: // fall thru
|
||||
case Interpreter::java_util_zip_CRC32C_updateDirectByteBuffer
|
||||
: entry_point = generate_CRC32C_updateBytes_entry(kind); break;
|
||||
#if defined(TARGET_ARCH_x86) && !defined(_LP64)
|
||||
// On x86_32 platforms, a special entry is generated for the following four methods.
|
||||
// On other platforms the normal entry is used to enter these methods.
|
||||
case Interpreter::java_lang_Float_intBitsToFloat
|
||||
: native = true; entry_point = generate_Float_intBitsToFloat_entry(); break;
|
||||
case Interpreter::java_lang_Float_floatToRawIntBits
|
||||
: native = true; entry_point = generate_Float_floatToRawIntBits_entry(); break;
|
||||
case Interpreter::java_lang_Double_longBitsToDouble
|
||||
: native = true; entry_point = generate_Double_longBitsToDouble_entry(); break;
|
||||
case Interpreter::java_lang_Double_doubleToRawLongBits
|
||||
: native = true; entry_point = generate_Double_doubleToRawLongBits_entry(); break;
|
||||
#else
|
||||
case Interpreter::java_lang_Float_intBitsToFloat:
|
||||
case Interpreter::java_lang_Float_floatToRawIntBits:
|
||||
case Interpreter::java_lang_Double_longBitsToDouble:
|
||||
case Interpreter::java_lang_Double_doubleToRawLongBits:
|
||||
native = true;
|
||||
break;
|
||||
#endif // defined(TARGET_ARCH_x86) && !defined(_LP64)
|
||||
#endif // CC_INTERP
|
||||
default:
|
||||
fatal("unexpected method kind: %d", kind);
|
||||
break;
|
||||
}
|
||||
|
||||
if (entry_point) {
|
||||
return entry_point;
|
||||
}
|
||||
|
||||
// We expect the normal and native entry points to be generated first so we can reuse them.
|
||||
if (native) {
|
||||
entry_point = Interpreter::entry_for_kind(synchronized ? Interpreter::native_synchronized : Interpreter::native);
|
||||
if (entry_point == NULL) {
|
||||
entry_point = generate_native_entry(synchronized);
|
||||
}
|
||||
} else {
|
||||
entry_point = Interpreter::entry_for_kind(synchronized ? Interpreter::zerolocals_synchronized : Interpreter::zerolocals);
|
||||
if (entry_point == NULL) {
|
||||
entry_point = generate_normal_entry(synchronized);
|
||||
}
|
||||
}
|
||||
|
||||
return entry_point;
|
||||
}
|
||||
|
@ -29,9 +29,6 @@
|
||||
#include "interpreter/cppInterpreter.hpp"
|
||||
#include "interpreter/templateInterpreter.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "entry_zero.hpp"
|
||||
#endif
|
||||
|
||||
// This file contains the platform-independent parts
|
||||
// of the interpreter and the interpreter generator.
|
||||
@ -116,34 +113,9 @@ class CodeletMark: ResourceMark {
|
||||
~CodeletMark();
|
||||
};
|
||||
|
||||
// Wrapper classes to produce Interpreter/InterpreterGenerator from either
|
||||
// Wrapper typedef to use the name Interpreter to mean either
|
||||
// the c++ interpreter or the template interpreter.
|
||||
|
||||
class Interpreter: public CC_INTERP_ONLY(CppInterpreter) NOT_CC_INTERP(TemplateInterpreter) {
|
||||
|
||||
public:
|
||||
// Debugging/printing
|
||||
static InterpreterCodelet* codelet_containing(address pc) { return (InterpreterCodelet*)_code->stub_containing(pc); }
|
||||
|
||||
#ifdef TARGET_ARCH_x86
|
||||
# include "interpreter_x86.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "interpreter_sparc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "interpreter_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "interpreter_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "interpreter_ppc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_aarch64
|
||||
# include "interpreter_aarch64.hpp"
|
||||
#endif
|
||||
|
||||
};
|
||||
typedef CC_INTERP_ONLY(CppInterpreter) NOT_CC_INTERP(TemplateInterpreter) Interpreter;
|
||||
|
||||
#endif // SHARE_VM_INTERPRETER_INTERPRETER_HPP
|
||||
|
@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 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 SHARE_VM_INTERPRETER_INTERPRETERGENERATOR_HPP
|
||||
#define SHARE_VM_INTERPRETER_INTERPRETERGENERATOR_HPP
|
||||
|
||||
#include "interpreter/cppInterpreter.hpp"
|
||||
#include "interpreter/cppInterpreterGenerator.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "interpreter/templateInterpreter.hpp"
|
||||
#include "interpreter/templateInterpreterGenerator.hpp"
|
||||
|
||||
// This file contains the platform-independent parts
|
||||
// of the interpreter generator.
|
||||
|
||||
|
||||
class InterpreterGenerator: public CC_INTERP_ONLY(CppInterpreterGenerator)
|
||||
NOT_CC_INTERP(TemplateInterpreterGenerator) {
|
||||
|
||||
public:
|
||||
|
||||
InterpreterGenerator(StubQueue* _code);
|
||||
// entry point generator
|
||||
address generate_method_entry(AbstractInterpreter::MethodKind kind);
|
||||
|
||||
#ifdef TARGET_ARCH_x86
|
||||
# include "interpreterGenerator_x86.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_sparc
|
||||
# include "interpreterGenerator_sparc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_zero
|
||||
# include "interpreterGenerator_zero.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_arm
|
||||
# include "interpreterGenerator_arm.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_ppc
|
||||
# include "interpreterGenerator_ppc.hpp"
|
||||
#endif
|
||||
#ifdef TARGET_ARCH_aarch64
|
||||
# include "interpreterGenerator_aarch64.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_INTERPRETER_INTERPRETERGENERATOR_HPP
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user