src/hotspot/cpu/zero/stack_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: 47687
diff changeset
     2
 * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
5335
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
     3
 * Copyright 2008, 2009, 2010 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: 5424
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5424
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: 5424
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: 47687
diff changeset
    26
#ifndef CPU_ZERO_STACK_ZERO_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47687
diff changeset
    27
#define CPU_ZERO_STACK_ZERO_HPP
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
46625
edefffab74e2 8183552: Move align functions to align.hpp
stefank
parents: 46619
diff changeset
    29
#include "utilities/align.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "utilities/sizes.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    32
class ZeroStack {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    33
 private:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    34
  intptr_t *_base; // the last available word
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    35
  intptr_t *_top;  // the word past the end of the stack
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    36
  intptr_t *_sp;   // the top word on the stack
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    37
5335
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
    38
 private:
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
    39
  int _shadow_pages_size; // how much ABI stack must we keep free?
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
    40
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    41
 public:
35479
62c12ca7a45e 8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents: 35201
diff changeset
    42
  ZeroStack();
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    43
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    44
  bool needs_setup() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    45
    return _base == NULL;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    46
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    47
5424
fc1c380199b0 6950178: Zero stack improvements
twisti
parents: 5418
diff changeset
    48
  int suggest_size(Thread *thread) const;
fc1c380199b0 6950178: Zero stack improvements
twisti
parents: 5418
diff changeset
    49
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    50
  void setup(void *mem, size_t size) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    51
    assert(needs_setup(), "already set up");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    52
    assert(!(size & WordAlignmentMask), "unaligned");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    53
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    54
    _base = (intptr_t *) mem;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    55
    _top  = _base + (size >> LogBytesPerWord);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    56
    _sp   = _top;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    57
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    58
  void teardown() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    59
    assert(!needs_setup(), "not set up");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    60
    assert(_sp == _top, "stuff on stack at teardown");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    61
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    62
    _base = NULL;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    63
    _top  = NULL;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    64
    _sp   = NULL;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    65
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    66
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    67
  intptr_t *sp() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    68
    return _sp;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    69
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    70
  void set_sp(intptr_t *new_sp) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    71
    assert(_top >= new_sp && new_sp >= _base, "bad stack pointer");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    72
    _sp = new_sp;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    73
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    74
5424
fc1c380199b0 6950178: Zero stack improvements
twisti
parents: 5418
diff changeset
    75
  int total_words() const {
fc1c380199b0 6950178: Zero stack improvements
twisti
parents: 5418
diff changeset
    76
    return _top - _base;
fc1c380199b0 6950178: Zero stack improvements
twisti
parents: 5418
diff changeset
    77
  }
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    78
  int available_words() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    79
    return _sp - _base;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    80
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    81
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    82
  void push(intptr_t value) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    83
    assert(_sp > _base, "stack overflow");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    84
    *(--_sp) = value;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    85
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    86
  intptr_t pop() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    87
    assert(_sp < _top, "stack underflow");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    88
    return *(_sp++);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    89
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    90
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    91
  void *alloc(size_t size) {
46619
a3919f5e8d2b 8178499: Remove _ptr_ and _size_ infixes from align functions
stefank
parents: 35479
diff changeset
    92
    int count = align_up(size, wordSize) >> LogBytesPerWord;
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    93
    assert(count <= available_words(), "stack overflow");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    94
    return _sp -= count;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    95
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    96
5335
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
    97
  int shadow_pages_size() const {
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
    98
    return _shadow_pages_size;
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
    99
  }
5424
fc1c380199b0 6950178: Zero stack improvements
twisti
parents: 5418
diff changeset
   100
  int abi_stack_available(Thread *thread) const;
5335
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
   101
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
   102
 public:
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
   103
  void overflow_check(int required_words, TRAPS);
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
   104
  static void handle_overflow(TRAPS);
4319cb12ddfe 6941224: Improved stack overflow handling for Zero
twisti
parents: 4013
diff changeset
   105
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   106
 public:
5418
c4955cb6ed33 6939182: Zero JNI handles fix
twisti
parents: 5335
diff changeset
   107
  void zap(int c) PRODUCT_RETURN;
c4955cb6ed33 6939182: Zero JNI handles fix
twisti
parents: 5335
diff changeset
   108
c4955cb6ed33 6939182: Zero JNI handles fix
twisti
parents: 5335
diff changeset
   109
 public:
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   110
  static ByteSize base_offset() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   111
    return byte_offset_of(ZeroStack, _base);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   112
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   113
  static ByteSize top_offset() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   114
    return byte_offset_of(ZeroStack, _top);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   115
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   116
  static ByteSize sp_offset() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   117
    return byte_offset_of(ZeroStack, _sp);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   118
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   119
};
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   120
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   121
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   122
class EntryFrame;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   123
class InterpreterFrame;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   124
class FakeStubFrame;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   125
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   126
//
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   127
// |  ...               |
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   128
// +--------------------+  ------------------
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   129
// |  ...               |       low addresses
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   130
// | frame_type         |
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   131
// | next_frame         |      high addresses
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   132
// +--------------------+  ------------------
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   133
// |  ...               |
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   134
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   135
class ZeroFrame {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   136
  friend class frame;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   137
  friend class ZeroStackPrinter;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   138
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   139
 protected:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   140
  ZeroFrame() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   141
    ShouldNotCallThis();
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   142
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   143
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   144
  enum Layout {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   145
    next_frame_off,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   146
    frame_type_off,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   147
    jf_header_words
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   148
  };
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   149
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   150
  enum FrameType {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   151
    ENTRY_FRAME = 1,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   152
    INTERPRETER_FRAME,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   153
    FAKE_STUB_FRAME
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   154
  };
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   155
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   156
 protected:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   157
  intptr_t *addr_of_word(int offset) const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   158
    return (intptr_t *) this - offset;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   159
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   160
  intptr_t value_of_word(int offset) const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   161
    return *addr_of_word(offset);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   162
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   163
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   164
 public:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   165
  ZeroFrame *next() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   166
    return (ZeroFrame *) value_of_word(next_frame_off);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   167
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   168
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   169
 protected:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   170
  FrameType type() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   171
    return (FrameType) value_of_word(frame_type_off);
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   172
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   173
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   174
 public:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   175
  bool is_entry_frame() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   176
    return type() == ENTRY_FRAME;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   177
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   178
  bool is_interpreter_frame() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   179
    return type() == INTERPRETER_FRAME;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   180
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   181
  bool is_fake_stub_frame() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   182
    return type() == FAKE_STUB_FRAME;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   183
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   184
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   185
 public:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   186
  EntryFrame *as_entry_frame() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   187
    assert(is_entry_frame(), "should be");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   188
    return (EntryFrame *) this;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   189
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   190
  InterpreterFrame *as_interpreter_frame() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   191
    assert(is_interpreter_frame(), "should be");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   192
    return (InterpreterFrame *) this;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   193
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   194
  FakeStubFrame *as_fake_stub_frame() const {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   195
    assert(is_fake_stub_frame(), "should be");
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   196
    return (FakeStubFrame *) this;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   197
  }
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   198
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   199
 public:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   200
  void identify_word(int   frame_index,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   201
                     int   offset,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   202
                     char* fieldbuf,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   203
                     char* valuebuf,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   204
                     int   buflen) const;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   205
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   206
 protected:
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   207
  void identify_vp_word(int       frame_index,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   208
                        intptr_t* addr,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   209
                        intptr_t* monitor_base,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   210
                        intptr_t* stack_base,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   211
                        char*     fieldbuf,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   212
                        int       buflen) const;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   213
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   214
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47687
diff changeset
   215
#endif // CPU_ZERO_STACK_ZERO_HPP