src/hotspot/cpu/x86/interp_masm_x86.hpp
author coleenp
Thu, 10 Jan 2019 15:13:51 -0500
changeset 53244 9807daeb47c4
parent 50380 bec342339138
child 55105 9ad765641e8f
permissions -rw-r--r--
8216167: Update include guards to reflect correct directories Summary: Use script and some manual fixup to fix directores names in include guards. Reviewed-by: lfoltan, eosterlund, kbarrett
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21095
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50380
diff changeset
     2
 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
21095
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
     4
 *
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
     7
 * published by the Free Software Foundation.
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
     8
 *
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    13
 * accompanied this code).
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    14
 *
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    18
 *
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    21
 * questions.
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    22
 *
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    23
 */
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    24
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50380
diff changeset
    25
#ifndef CPU_X86_INTERP_MASM_X86_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50380
diff changeset
    26
#define CPU_X86_INTERP_MASM_X86_HPP
21095
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    27
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    28
#include "asm/macroAssembler.hpp"
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    29
#include "interpreter/invocationCounter.hpp"
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    30
#include "runtime/frame.hpp"
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    31
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    32
// This file specializes the assember with interpreter-specific macros
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    33
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents: 33070
diff changeset
    34
typedef ByteSize (*OffsetFunction)(uint);
21095
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    35
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
    36
class InterpreterMacroAssembler: public MacroAssembler {
49748
6a880e576856 8199417: Modularize interpreter GC barriers
eosterlund
parents: 47881
diff changeset
    37
 public:
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    38
  // Interpreter specific version of call_VM_base
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    39
  virtual void call_VM_leaf_base(address entry_point,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    40
                                 int number_of_arguments);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    41
49748
6a880e576856 8199417: Modularize interpreter GC barriers
eosterlund
parents: 47881
diff changeset
    42
 protected:
6a880e576856 8199417: Modularize interpreter GC barriers
eosterlund
parents: 47881
diff changeset
    43
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    44
  virtual void call_VM_base(Register oop_result,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    45
                            Register java_thread,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    46
                            Register last_java_sp,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    47
                            address  entry_point,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    48
                            int number_of_arguments,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    49
                            bool check_exceptions);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    50
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    51
  // base routine for all dispatches
47881
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
    52
  void dispatch_base(TosState state, address* table, bool verifyoop = true, bool generate_poll = false);
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    53
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    54
 public:
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    55
  InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code),
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    56
    _locals_register(LP64_ONLY(r14) NOT_LP64(rdi)),
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    57
    _bcp_register(LP64_ONLY(r13) NOT_LP64(rsi)) {}
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    58
33070
54f3f085b165 8136525: Generate interpreter entries only once and avoid unnecessary jump to jump
mdoerr
parents: 32391
diff changeset
    59
  void jump_to_entry(address entry);
54f3f085b165 8136525: Generate interpreter entries only once and avoid unnecessary jump to jump
mdoerr
parents: 32391
diff changeset
    60
46294
345a46524a19 8172020: Internal Error (cpu/arm/vm/frame_arm.cpp:571): assert(obj == __null || Universe::heap()->is_in(obj)) failed: sanity check #
cjplummer
parents: 37480
diff changeset
    61
 virtual void check_and_handle_popframe(Register java_thread);
345a46524a19 8172020: Internal Error (cpu/arm/vm/frame_arm.cpp:571): assert(obj == __null || Universe::heap()->is_in(obj)) failed: sanity check #
cjplummer
parents: 37480
diff changeset
    62
 virtual void check_and_handle_earlyret(Register java_thread);
345a46524a19 8172020: Internal Error (cpu/arm/vm/frame_arm.cpp:571): assert(obj == __null || Universe::heap()->is_in(obj)) failed: sanity check #
cjplummer
parents: 37480
diff changeset
    63
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    64
  void load_earlyret_value(TosState state);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    65
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    66
  // Interpreter-specific registers
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    67
  void save_bcp() {
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    68
    movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), _bcp_register);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    69
  }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    70
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    71
  void restore_bcp() {
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    72
    movptr(_bcp_register, Address(rbp, frame::interpreter_frame_bcp_offset * wordSize));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    73
  }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    74
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    75
  void restore_locals() {
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    76
    movptr(_locals_register, Address(rbp, frame::interpreter_frame_locals_offset * wordSize));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    77
  }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    78
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    79
  // Helpers for runtime call arguments/results
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    80
  void get_method(Register reg) {
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    81
    movptr(reg, Address(rbp, frame::interpreter_frame_method_offset * wordSize));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    82
  }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    83
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    84
  void get_const(Register reg) {
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    85
    get_method(reg);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    86
    movptr(reg, Address(reg, Method::const_offset()));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    87
  }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    88
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    89
  void get_constant_pool(Register reg) {
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    90
    get_const(reg);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    91
    movptr(reg, Address(reg, ConstMethod::constants_offset()));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    92
  }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    93
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    94
  void get_constant_pool_cache(Register reg) {
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    95
    get_constant_pool(reg);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    96
    movptr(reg, Address(reg, ConstantPool::cache_offset_in_bytes()));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    97
  }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    98
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
    99
  void get_cpool_and_tags(Register cpool, Register tags) {
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   100
    get_constant_pool(cpool);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   101
    movptr(tags, Address(cpool, ConstantPool::tags_offset_in_bytes()));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   102
  }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   103
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   104
  void get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   105
  void get_cache_and_index_at_bcp(Register cache,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   106
                                  Register index,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   107
                                  int bcp_offset,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   108
                                  size_t index_size = sizeof(u2));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   109
  void get_cache_and_index_and_bytecode_at_bcp(Register cache,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   110
                                               Register index,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   111
                                               Register bytecode,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   112
                                               int byte_no,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   113
                                               int bcp_offset,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   114
                                               size_t index_size = sizeof(u2));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   115
  void get_cache_entry_pointer_at_bcp(Register cache,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   116
                                      Register tmp,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   117
                                      int bcp_offset,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   118
                                      size_t index_size = sizeof(u2));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   119
  void get_cache_index_at_bcp(Register index,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   120
                              int bcp_offset,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   121
                              size_t index_size = sizeof(u2));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   122
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   123
  // load cpool->resolved_references(index);
49816
a3e79f97e86b 8200555: OopHandle should use Access API
coleenp
parents: 49748
diff changeset
   124
  void load_resolved_reference_at_index(Register result, Register index, Register tmp = rscratch2);
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   125
46427
54713555867e 8171392: Move Klass pointers outside of ConstantPool entries so ConstantPool can be read-only
iklam
parents: 46294
diff changeset
   126
  // load cpool->resolved_klass_at(index)
54713555867e 8171392: Move Klass pointers outside of ConstantPool entries so ConstantPool can be read-only
iklam
parents: 46294
diff changeset
   127
  void load_resolved_klass_at_index(Register cpool,  // the constant pool (corrupted on return)
54713555867e 8171392: Move Klass pointers outside of ConstantPool entries so ConstantPool can be read-only
iklam
parents: 46294
diff changeset
   128
                                    Register index,  // the constant pool index (corrupted on return)
54713555867e 8171392: Move Klass pointers outside of ConstantPool entries so ConstantPool can be read-only
iklam
parents: 46294
diff changeset
   129
                                    Register klass); // contains the Klass on return
54713555867e 8171392: Move Klass pointers outside of ConstantPool entries so ConstantPool can be read-only
iklam
parents: 46294
diff changeset
   130
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   131
  NOT_LP64(void f2ieee();)        // truncate ftos to 32bits
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   132
  NOT_LP64(void d2ieee();)        // truncate dtos to 64bits
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   133
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   134
  // Expression stack
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   135
  void pop_ptr(Register r = rax);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   136
  void pop_i(Register r = rax);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   137
  void push_ptr(Register r = rax);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   138
  void push_i(Register r = rax);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   139
32391
01e2f5e916c7 8076373: In 32-bit VM interpreter and compiled code process NaN values differently
zmajo
parents: 31046
diff changeset
   140
  void push_f(XMMRegister r);
01e2f5e916c7 8076373: In 32-bit VM interpreter and compiled code process NaN values differently
zmajo
parents: 31046
diff changeset
   141
  void pop_f(XMMRegister r);
01e2f5e916c7 8076373: In 32-bit VM interpreter and compiled code process NaN values differently
zmajo
parents: 31046
diff changeset
   142
  void pop_d(XMMRegister r);
01e2f5e916c7 8076373: In 32-bit VM interpreter and compiled code process NaN values differently
zmajo
parents: 31046
diff changeset
   143
  void push_d(XMMRegister r);
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   144
#ifdef _LP64
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   145
  void pop_l(Register r = rax);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   146
  void push_l(Register r = rax);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   147
#else
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   148
  void pop_l(Register lo = rax, Register hi = rdx);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   149
  void pop_f();
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   150
  void pop_d();
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   151
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   152
  void push_l(Register lo = rax, Register hi = rdx);
32391
01e2f5e916c7 8076373: In 32-bit VM interpreter and compiled code process NaN values differently
zmajo
parents: 31046
diff changeset
   153
  void push_d();
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   154
  void push_f();
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   155
#endif // _LP64
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   156
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   157
  void pop(Register r) { ((MacroAssembler*)this)->pop(r); }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   158
  void push(Register r) { ((MacroAssembler*)this)->push(r); }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   159
  void push(int32_t imm ) { ((MacroAssembler*)this)->push(imm); }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   160
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   161
  void pop(TosState state);        // transition vtos -> state
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   162
  void push(TosState state);       // transition state -> vtos
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   163
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   164
  // These are dummies to prevent surprise implicit conversions to Register
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   165
  void pop(void* v); // Add unimplemented ambiguous method
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   166
  void push(void* v);   // Add unimplemented ambiguous method
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   167
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   168
  void empty_expression_stack() {
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   169
    movptr(rsp, Address(rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize));
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   170
    // NULL last_sp until next java call
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   171
    movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
34651
07b1cc0f6040 8144534: Refactor templateInterpreter and templateInterpreterGenerator functions
coleenp
parents: 33160
diff changeset
   172
    NOT_LP64(empty_FPU_stack());
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   173
  }
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   174
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   175
  // Helpers for swap and dup
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   176
  void load_ptr(int n, Register val);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   177
  void store_ptr(int n, Register val);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   178
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   179
  // Generate a subtype check: branch to ok_is_subtype if sub_klass is
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   180
  // a subtype of super_klass.
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   181
  void gen_subtype_check( Register sub_klass, Label &ok_is_subtype );
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   182
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   183
  // Dispatching
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   184
  void dispatch_prolog(TosState state, int step = 0);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   185
  void dispatch_epilog(TosState state, int step = 0);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   186
  // dispatch via rbx (assume rbx is loaded already)
47881
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
   187
  void dispatch_only(TosState state, bool generate_poll = false);
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   188
  // dispatch normal table via rbx (assume rbx is loaded already)
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   189
  void dispatch_only_normal(TosState state);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   190
  void dispatch_only_noverify(TosState state);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   191
  // load rbx from [_bcp_register + step] and dispatch via rbx
47881
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
   192
  void dispatch_next(TosState state, int step = 0, bool generate_poll = false);
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   193
  // load rbx from [_bcp_register] and dispatch via rbx and table
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   194
  void dispatch_via (TosState state, address* table);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   195
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   196
  // jump to an invoked target
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   197
  void prepare_to_jump_from_interpreted();
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   198
  void jump_from_interpreted(Register method, Register temp);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   199
37480
291ee208fb72 8132051: Better byte behavior
coleenp
parents: 35214
diff changeset
   200
  // narrow int return value
291ee208fb72 8132051: Better byte behavior
coleenp
parents: 35214
diff changeset
   201
  void narrow(Register result);
291ee208fb72 8132051: Better byte behavior
coleenp
parents: 35214
diff changeset
   202
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   203
  // Returning from interpreted functions
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   204
  //
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   205
  // Removes the current activation (incl. unlocking of monitors)
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   206
  // and sets up the return address.  This code is also used for
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   207
  // exception unwindwing. In that case, we do not want to throw
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   208
  // IllegalMonitorStateExceptions, since that might get us into an
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   209
  // infinite rethrow exception loop.
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   210
  // Additionally this code is used for popFrame and earlyReturn.
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   211
  // In popFrame case we want to skip throwing an exception,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   212
  // installing an exception, and notifying jvmdi.
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   213
  // In earlyReturn case we only want to skip throwing an exception
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   214
  // and installing an exception.
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   215
  void remove_activation(TosState state, Register ret_addr,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   216
                         bool throw_monitor_exception = true,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   217
                         bool install_monitor_exception = true,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   218
                         bool notify_jvmdi = true);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   219
  void get_method_counters(Register method, Register mcs, Label& skip);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   220
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   221
  // Object locking
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   222
  void lock_object  (Register lock_reg);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   223
  void unlock_object(Register lock_reg);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   224
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   225
  // Interpreter profiling operations
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   226
  void set_method_data_pointer_for_bcp();
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   227
  void test_method_data_pointer(Register mdp, Label& zero_continue);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   228
  void verify_method_data_pointer();
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   229
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   230
  void set_mdp_data_at(Register mdp_in, int constant, Register value);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   231
  void increment_mdp_data_at(Address data, bool decrement = false);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   232
  void increment_mdp_data_at(Register mdp_in, int constant,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   233
                             bool decrement = false);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   234
  void increment_mdp_data_at(Register mdp_in, Register reg, int constant,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   235
                             bool decrement = false);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   236
  void increment_mask_and_jump(Address counter_addr,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   237
                               int increment, Address mask,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   238
                               Register scratch, bool preloaded,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   239
                               Condition cond, Label* where);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   240
  void set_mdp_flag_at(Register mdp_in, int flag_constant);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   241
  void test_mdp_data_at(Register mdp_in, int offset, Register value,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   242
                        Register test_value_out,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   243
                        Label& not_equal_continue);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   244
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   245
  void record_klass_in_profile(Register receiver, Register mdp,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   246
                               Register reg2, bool is_virtual_call);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   247
  void record_klass_in_profile_helper(Register receiver, Register mdp,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   248
                                      Register reg2, int start_row,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   249
                                      Label& done, bool is_virtual_call);
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents: 33070
diff changeset
   250
  void record_item_in_profile_helper(Register item, Register mdp,
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents: 33070
diff changeset
   251
                                     Register reg2, int start_row, Label& done, int total_rows,
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents: 33070
diff changeset
   252
                                     OffsetFunction item_offset_fn, OffsetFunction item_count_offset_fn,
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents: 33070
diff changeset
   253
                                     int non_profiled_offset);
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   254
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   255
  void update_mdp_by_offset(Register mdp_in, int offset_of_offset);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   256
  void update_mdp_by_offset(Register mdp_in, Register reg, int offset_of_disp);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   257
  void update_mdp_by_constant(Register mdp_in, int constant);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   258
  void update_mdp_for_ret(Register return_bci);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   259
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   260
  void profile_taken_branch(Register mdp, Register bumped_count);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   261
  void profile_not_taken_branch(Register mdp);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   262
  void profile_call(Register mdp);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   263
  void profile_final_call(Register mdp);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   264
  void profile_virtual_call(Register receiver, Register mdp,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   265
                            Register scratch2,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   266
                            bool receiver_can_be_null = false);
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents: 33070
diff changeset
   267
  void profile_called_method(Register method, Register mdp, Register reg2) NOT_JVMCI_RETURN;
29578
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   268
  void profile_ret(Register return_bci, Register mdp);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   269
  void profile_null_seen(Register mdp);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   270
  void profile_typecheck(Register mdp, Register klass, Register scratch);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   271
  void profile_typecheck_failed(Register mdp);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   272
  void profile_switch_default(Register mdp);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   273
  void profile_switch_case(Register index_in_scratch, Register mdp,
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   274
                           Register scratch2);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   275
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   276
  // Debugging
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   277
  // only if +VerifyOops && state == atos
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   278
  void verify_oop(Register reg, TosState state = atos);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   279
  // only if +VerifyFPU  && (state == ftos || state == dtos)
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   280
  void verify_FPU(int stack_depth, TosState state = ftos);
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   281
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   282
  typedef enum { NotifyJVMTI, SkipNotifyJVMTI } NotifyMethodExitMode;
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   283
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   284
  // support for jvmti/dtrace
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   285
  void notify_method_entry();
0d3bd11f9e02 8074717: Merge interp_masm files for x86 _32 and _64
coleenp
parents: 21095
diff changeset
   286
  void notify_method_exit(TosState state, NotifyMethodExitMode mode);
21095
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   287
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   288
 private:
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   289
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   290
  Register _locals_register; // register that contains the pointer to the locals
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   291
  Register _bcp_register; // register that contains the bcp
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   292
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   293
 public:
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   294
  void profile_obj_type(Register obj, const Address& mdo_addr);
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   295
  void profile_arguments_type(Register mdp, Register callee, Register tmp, bool is_virtual);
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   296
  void profile_return_type(Register mdp, Register ret, Register tmp);
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   297
  void profile_parameters_type(Register mdp, Register tmp1, Register tmp2);
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   298
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   299
};
1a04f7b3946e 8026251: New type profiling points: parameters to methods
roland
parents:
diff changeset
   300
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50380
diff changeset
   301
#endif // CPU_X86_INTERP_MASM_X86_HPP