/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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 "memory/allocation.hpp"
#include "oops/methodDataOop.hpp"
#include "oops/methodOop.hpp"
#include "runtime/basicLock.hpp"
#include "runtime/globals.hpp"
#include "utilities/globalDefinitions.hpp"
#ifdef TARGET_ARCH_x86
# include "bytes_x86.hpp"
#endif
#ifdef TARGET_ARCH_sparc
# include "bytes_sparc.hpp"
#endif
#ifdef TARGET_ARCH_zero
# include "bytes_zero.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "bytes_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "bytes_ppc.hpp"
#endif
#ifdef CC_INTERP
// JavaStack Implementation
// CVM definitions find hotspot equivalents...
union VMJavaVal64 {
jlong l;
jdouble d;
uint32_t v[2];
};
struct call_message {
};
struct osr_message {
};
struct osr_result {
};
// Result returned to frame manager
union frame_manager_message {
};
friend class SharedRuntime;
friend class AbstractInterpreterGenerator;
friend class CppInterpreterGenerator;
friend class InterpreterGenerator;
friend class InterpreterMacroAssembler;
friend class frame;
friend class VMStructs;
public:
enum messages {
// status message to C++ interpreter
// requests to frame manager from C++ interpreter
};
private:
public:
// Constructor is only used by the initialization step. All other instances are created
// by the frame manager.
//
// Deoptimization support
//
bool top_frame);
/*
* Generic 32-bit wide "Java slot" definition. This type occurs
* in operand stacks, Java locals, object fields, constant pools.
*/
union VMJavaVal32 {
jint i;
jfloat f;
class oopDesc* r;
};
/*
* Generic 64-bit Java value definition
*/
union VMJavaVal64 {
jlong l;
jdouble d;
uint32_t v[2];
};
/*
* Generic 32-bit wide "Java slot" definition. This type occurs
* in Java locals, object fields, constant pools, and
* operand stacks (as a CVMStackVal32).
*/
typedef union VMSlotVal32 {
VMJavaVal32 j; /* For "Java" values */
address a; /* a return created by jsr or jsr_w */
} VMSlotVal32;
/*
* Generic 32-bit wide stack slot definition.
*/
union VMStackVal32 {
VMJavaVal32 j; /* For "Java" values */
VMSlotVal32 s; /* any value from a "slot" or locals[] */
};
/*
* 64-bit Arithmetic:
*
* The functions below follow the semantics of the
* ladd, land, ldiv, lmul, lor, lxor, and lrem bytecodes,
* respectively.
*/
/*
* Shift:
*
* The functions below follow the semantics of the
* lushr, lshl, and lshr bytecodes, respectively.
*/
/*
* Unary:
*
* Return the negation of "op" (-op), according to
* the semantics of the lneg bytecode.
*/
/*
* Return the complement of "op" (~op)
*/
/*
* Comparisons to 0:
*/
/*
* Between operands:
*/
/*
* Comparisons (returning an jint value: 0, 1, or -1)
*
* Between operands:
*
* Compare "op1" and "op2" according to the semantics of the
* "lcmp" bytecode.
*/
/*
* Convert int to long, according to "i2l" bytecode semantics
*/
/*
* Convert long to int, according to "l2i" bytecode semantics
*/
/*
* Convert long to float, according to "l2f" bytecode semantics
*/
/*
* Convert long to double, according to "l2d" bytecode semantics
*/
/*
* Java floating-point float value manipulation.
*
* The result argument is, once again, an lvalue.
*
* Arithmetic:
*
* The functions below follow the semantics of the
* fadd, fsub, fmul, fdiv, and frem bytecodes,
* respectively.
*/
/*
* Unary:
*
* Return the negation of "op" (-op), according to
* the semantics of the fneg bytecode.
*/
/*
* Comparisons (returning an int value: 0, 1, or -1)
*
* Between operands:
*
* Compare "op1" and "op2" according to the semantics of the
* "fcmpl" (direction is -1) or "fcmpg" (direction is 1) bytecodes.
*/
/*
* Conversion:
*/
/*
* Convert float to double, according to "f2d" bytecode semantics
*/
/*
******************************************
* Java double floating-point manipulation.
******************************************
*
* The result argument is, once again, an lvalue.
*
* Conversions:
*/
/*
* Convert double to int, according to "d2i" bytecode semantics
*/
/*
* Convert double to float, according to "d2f" bytecode semantics
*/
/*
* Convert int to double, according to "i2d" bytecode semantics
*/
/*
* Arithmetic:
*
* The functions below follow the semantics of the
* dadd, dsub, ddiv, dmul, and drem bytecodes, respectively.
*/
/*
* Unary:
*
* Return the negation of "op" (-op), according to
* the semantics of the dneg bytecode.
*/
/*
* Comparisons (returning an int32_t value: 0, 1, or -1)
*
* Between operands:
*
* Compare "op1" and "op2" according to the semantics of the
* "dcmpl" (direction is -1) or "dcmpg" (direction is 1) bytecodes.
*/
/*
* Copy two typeless 32-bit words from one location to another.
* This is semantically equivalent to:
*
* to[0] = from[0];
* to[1] = from[1];
*
* but this interface is provided for those platforms that could
* optimize this into a single 64-bit transfer.
*/
// Arithmetic operations
/*
* Java arithmetic methods.
* The functions below follow the semantics of the
* iadd, isub, imul, idiv, irem, iand, ior, ixor,
* and ineg bytecodes, respectively.
*/
/*
* Shift Operation:
* The functions below follow the semantics of the
* iushr, ishl, and ishr bytecodes, respectively.
*/
/*
* Unary Operation:
*
* Return the negation of "op" (-op), according to
* the semantics of the ineg bytecode.
*/
/*
* Int Conversions:
*/
/*
* Convert int to float, according to "i2f" bytecode semantics
*/
/*
* Convert int to byte, according to "i2b" bytecode semantics
*/
/*
* Convert int to char, according to "i2c" bytecode semantics
*/
/*
* Convert int to short, according to "i2s" bytecode semantics
*/
/*=========================================================================
* Bytecode interpreter operations
*=======================================================================*/
// umm don't like this method modifies its object
// The Interpreter used when
// The interpreter used if JVMTI needs interpreter events
static void End_Of_Interpreter(void);
// Inline static functions for Java Stack and Local manipulation
// only used for value types
// needs to be platform dep for the 32 bit platforms.
// Locals
// Support for dup and swap
#ifndef PRODUCT
void print();
#endif // PRODUCT
#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
}; // BytecodeInterpreter
#endif // CC_INTERP
#endif // SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP