src/hotspot/cpu/zero/bytecodeInterpreter_zero.hpp
author stefank
Thu, 09 May 2019 14:28:30 +0200
changeset 54786 ebf733a324d4
parent 53244 9807daeb47c4
permissions -rw-r--r--
8223624: Cleanup includes of universe.hpp Reviewed-by: coleenp, lkorinth
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47216
diff changeset
     2
 * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
9136
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
     3
 * Copyright 2007, 2008, 2011 Red Hat, Inc.
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     5
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     8
 * published by the Free Software Foundation.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
     9
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    14
 * accompanied this code).
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    15
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    19
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4013
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4013
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4013
diff changeset
    22
 * questions.
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    23
 *
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    24
 */
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    25
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47216
diff changeset
    26
#ifndef CPU_ZERO_BYTECODEINTERPRETER_ZERO_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47216
diff changeset
    27
#define CPU_ZERO_BYTECODEINTERPRETER_ZERO_HPP
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    29
// Platform specific for C++ based Interpreter
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    30
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    31
#if defined(PPC) || defined(SPARC) || defined(IA64)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    32
#define LOTS_OF_REGS   // Use plenty of registers
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    33
#else
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    34
#undef LOTS_OF_REGS    // Loser platforms
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    35
#endif
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    36
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    37
 private:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    38
  interpreterState _self_link;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    39
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    40
 public:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    41
  inline void set_locals(intptr_t* new_locals) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    42
    _locals = new_locals;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    43
  }
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 9136
diff changeset
    44
  inline void set_method(Method* new_method) {
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    45
    _method = new_method;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    46
  }
38074
8475fdc6dcc3 8154580: Save mirror in interpreter frame to enable cleanups of CLDClosure
coleenp
parents: 22849
diff changeset
    47
  inline void set_mirror(oop new_mirror) {
8475fdc6dcc3 8154580: Save mirror in interpreter frame to enable cleanups of CLDClosure
coleenp
parents: 22849
diff changeset
    48
    _mirror = new_mirror;
8475fdc6dcc3 8154580: Save mirror in interpreter frame to enable cleanups of CLDClosure
coleenp
parents: 22849
diff changeset
    49
  }
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    50
  inline interpreterState self_link() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    51
    return _self_link;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    52
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    53
  inline void set_self_link(interpreterState new_self_link) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    54
    _self_link = new_self_link;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    55
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    56
  inline interpreterState prev_link() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    57
    return _prev_link;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    58
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    59
  inline void set_prev_link(interpreterState new_prev_link) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    60
    _prev_link = new_prev_link;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    61
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    62
  inline void set_stack_limit(intptr_t* new_stack_limit) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    63
    _stack_limit = new_stack_limit;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    64
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    65
  inline void set_stack_base(intptr_t* new_stack_base) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    66
    _stack_base = new_stack_base;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    67
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    68
  inline void set_monitor_base(BasicObjectLock *new_monitor_base) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    69
    _monitor_base = new_monitor_base;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    70
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    71
  inline void set_thread(JavaThread* new_thread) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    72
    _thread = new_thread;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    73
  }
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 9136
diff changeset
    74
  inline void set_constants(ConstantPoolCache* new_constants) {
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    75
    _constants = new_constants;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    76
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    77
  inline oop oop_temp() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    78
    return _oop_temp;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    79
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    80
  inline oop *oop_temp_addr() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    81
    return &_oop_temp;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    82
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    83
  inline void set_oop_temp(oop new_oop_temp) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    84
    _oop_temp = new_oop_temp;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    85
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    86
  inline address callee_entry_point() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    87
    return _result._to_call._callee_entry_point;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    88
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    89
  inline address osr_buf() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    90
    return _result._osr._osr_buf;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    91
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    92
  inline address osr_entry() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    93
    return _result._osr._osr_entry;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    94
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    95
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    96
 public:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    97
  const char *name_of_field_at_address(address addr);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    98
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    99
// The frame manager handles this
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   100
#define SET_LAST_JAVA_FRAME()
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   101
#define RESET_LAST_JAVA_FRAME()
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   102
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   103
// ZeroStack Implementation
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   104
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   105
#undef STACK_INT
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   106
#undef STACK_FLOAT
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   107
#undef STACK_ADDR
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   108
#undef STACK_OBJECT
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   109
#undef STACK_DOUBLE
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   110
#undef STACK_LONG
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   111
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   112
#define GET_STACK_SLOT(offset)    (*((intptr_t*) &topOfStack[-(offset)]))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   113
#define STACK_SLOT(offset)    ((address) &topOfStack[-(offset)])
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   114
#define STACK_ADDR(offset)    (*((address *) &topOfStack[-(offset)]))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   115
#define STACK_INT(offset)     (*((jint*) &topOfStack[-(offset)]))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   116
#define STACK_FLOAT(offset)   (*((jfloat *) &topOfStack[-(offset)]))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   117
#define STACK_OBJECT(offset)  (*((oop *) &topOfStack [-(offset)]))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   118
#define STACK_DOUBLE(offset)  (((VMJavaVal64*) &topOfStack[-(offset)])->d)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   119
#define STACK_LONG(offset)    (((VMJavaVal64 *) &topOfStack[-(offset)])->l)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   120
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   121
#define SET_STACK_SLOT(value, offset)   (*(intptr_t*)&topOfStack[-(offset)] = *(intptr_t*)(value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   122
#define SET_STACK_ADDR(value, offset)   (*((address *)&topOfStack[-(offset)]) = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   123
#define SET_STACK_INT(value, offset)    (*((jint *)&topOfStack[-(offset)]) = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   124
#define SET_STACK_FLOAT(value, offset)  (*((jfloat *)&topOfStack[-(offset)]) = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   125
#define SET_STACK_OBJECT(value, offset) (*((oop *)&topOfStack[-(offset)]) = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   126
#define SET_STACK_DOUBLE(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   127
#define SET_STACK_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d =  \
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   128
                                                 ((VMJavaVal64*)(addr))->d)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   129
#define SET_STACK_LONG(value, offset)   (((VMJavaVal64*)&topOfStack[-(offset)])->l = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   130
#define SET_STACK_LONG_FROM_ADDR(addr, offset)   (((VMJavaVal64*)&topOfStack[-(offset)])->l =  \
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   131
                                                 ((VMJavaVal64*)(addr))->l)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   132
// JavaLocals implementation
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   133
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   134
#define LOCALS_SLOT(offset)    ((intptr_t*)&locals[-(offset)])
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   135
#define LOCALS_ADDR(offset)    ((address)locals[-(offset)])
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   136
#define LOCALS_INT(offset)     (*((jint*)&locals[-(offset)]))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   137
#define LOCALS_FLOAT(offset)   (*((jfloat*)&locals[-(offset)]))
22849
b8670e920530 8028514: PPC64: Fix C++ Interpreter after '7195622: CheckUnhandledOops has limited usefulness now'
simonis
parents: 13728
diff changeset
   138
#define LOCALS_OBJECT(offset)  (cast_to_oop(locals[-(offset)]))
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   139
#define LOCALS_DOUBLE(offset)  (((VMJavaVal64*)&locals[-((offset) + 1)])->d)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   140
#define LOCALS_LONG(offset)    (((VMJavaVal64*)&locals[-((offset) + 1)])->l)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   141
#define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)]))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   142
#define LOCALS_DOUBLE_AT(offset) (((address)&locals[-((offset) + 1)]))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   143
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   144
#define SET_LOCALS_SLOT(value, offset)    (*(intptr_t*)&locals[-(offset)] = *(intptr_t *)(value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   145
#define SET_LOCALS_ADDR(value, offset)    (*((address *)&locals[-(offset)]) = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   146
#define SET_LOCALS_INT(value, offset)     (*((jint *)&locals[-(offset)]) = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   147
#define SET_LOCALS_FLOAT(value, offset)   (*((jfloat *)&locals[-(offset)]) = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   148
#define SET_LOCALS_OBJECT(value, offset)  (*((oop *)&locals[-(offset)]) = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   149
#define SET_LOCALS_DOUBLE(value, offset)  (((VMJavaVal64*)&locals[-((offset)+1)])->d = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   150
#define SET_LOCALS_LONG(value, offset)    (((VMJavaVal64*)&locals[-((offset)+1)])->l = (value))
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   151
#define SET_LOCALS_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = \
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   152
                                                  ((VMJavaVal64*)(addr))->d)
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   153
#define SET_LOCALS_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = \
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   154
                                                ((VMJavaVal64*)(addr))->l)
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   155
9136
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   156
// VMSlots implementation
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   157
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   158
#define VMSLOTS_SLOT(offset)    ((intptr_t*)&vmslots[(offset)])
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   159
#define VMSLOTS_ADDR(offset)    ((address)vmslots[(offset)])
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   160
#define VMSLOTS_INT(offset)     (*((jint*)&vmslots[(offset)]))
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   161
#define VMSLOTS_FLOAT(offset)   (*((jfloat*)&vmslots[(offset)]))
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   162
#define VMSLOTS_OBJECT(offset)  ((oop)vmslots[(offset)])
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   163
#define VMSLOTS_DOUBLE(offset)  (((VMJavaVal64*)&vmslots[(offset) - 1])->d)
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   164
#define VMSLOTS_LONG(offset)    (((VMJavaVal64*)&vmslots[(offset) - 1])->l)
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   165
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   166
#define SET_VMSLOTS_SLOT(value, offset)   (*(intptr_t*)&vmslots[(offset)] = *(intptr_t *)(value))
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   167
#define SET_VMSLOTS_ADDR(value, offset)   (*((address *)&vmslots[(offset)]) = (value))
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   168
#define SET_VMSLOTS_INT(value, offset)    (*((jint *)&vmslots[(offset)]) = (value))
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   169
#define SET_VMSLOTS_FLOAT(value, offset)  (*((jfloat *)&vmslots[(offset)]) = (value))
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   170
#define SET_VMSLOTS_OBJECT(value, offset) (*((oop *)&vmslots[(offset)]) = (value))
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   171
#define SET_VMSLOTS_DOUBLE(value, offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->d = (value))
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   172
#define SET_VMSLOTS_LONG(value, offset)   (((VMJavaVal64*)&vmslots[(offset) - 1])->l = (value))
94ebba447157 7035870: JSR 292: Zero support
twisti
parents: 7397
diff changeset
   173
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47216
diff changeset
   174
#endif // CPU_ZERO_BYTECODEINTERPRETER_ZERO_HPP