src/hotspot/cpu/zero/sharedRuntime_zero.cpp
author stefank
Thu, 09 May 2019 14:28:30 +0200
changeset 54786 ebf733a324d4
parent 49449 ef5d5d343e2a
child 57710 05ff6e27de45
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
/*
33593
60764a78fa5c 8140274: methodHandles and constantPoolHandles should be passed as const references
coleenp
parents: 22872
diff changeset
     2
 * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
9103
535a93f494f6 7032458: Zero and Shark fixes
twisti
parents: 7397
diff changeset
     3
 * Copyright 2007, 2008, 2009, 2010, 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: 4745
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4745
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: 4745
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
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#include "precompiled.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
#include "asm/assembler.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
#include "assembler_zero.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "code/debugInfoRec.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "code/icBuffer.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
#include "code/vtableStubs.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    32
#include "interpreter/interpreter.hpp"
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 10260
diff changeset
    33
#include "oops/compiledICHolder.hpp"
49449
ef5d5d343e2a 8199263: Split interfaceSupport.hpp to not require including .inline.hpp files
coleenp
parents: 47687
diff changeset
    34
#include "runtime/interfaceSupport.inline.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    35
#include "runtime/sharedRuntime.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    36
#include "runtime/vframeArray.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    37
#include "vmreg_zero.inline.hpp"
14294
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    38
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    39
#ifdef COMPILER1
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    40
#include "c1/c1_Runtime1.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    41
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    42
#ifdef COMPILER2
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    43
#include "opto/runtime.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    44
#endif
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    45
14294
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    46
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    47
static address zero_null_code_stub() {
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    48
  address start = ShouldNotCallThisStub();
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    49
  return start;
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    50
}
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    51
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    52
int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    53
                                           VMRegPair *regs,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    54
                                           int total_args_passed,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    55
                                           int is_outgoing) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    56
  return 0;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    57
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    58
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    59
AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    60
                        MacroAssembler *masm,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    61
                        int total_args_passed,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    62
                        int comp_args_on_stack,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    63
                        const BasicType *sig_bt,
4745
5ec280d96474 6920970: Zero build fixes after 6849984 and 6911204
twisti
parents: 4448
diff changeset
    64
                        const VMRegPair *regs,
5ec280d96474 6920970: Zero build fixes after 6849984 and 6911204
twisti
parents: 4448
diff changeset
    65
                        AdapterFingerPrint *fingerprint) {
5ec280d96474 6920970: Zero build fixes after 6849984 and 6911204
twisti
parents: 4448
diff changeset
    66
  return AdapterHandlerLibrary::new_entry(
5ec280d96474 6920970: Zero build fixes after 6849984 and 6911204
twisti
parents: 4448
diff changeset
    67
    fingerprint,
14294
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    68
    CAST_FROM_FN_PTR(address,zero_null_code_stub),
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    69
    CAST_FROM_FN_PTR(address,zero_null_code_stub),
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    70
    CAST_FROM_FN_PTR(address,zero_null_code_stub));
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    71
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    72
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    73
nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
33593
60764a78fa5c 8140274: methodHandles and constantPoolHandles should be passed as const references
coleenp
parents: 22872
diff changeset
    74
                                                const methodHandle& method,
9103
535a93f494f6 7032458: Zero and Shark fixes
twisti
parents: 7397
diff changeset
    75
                                                int compile_id,
535a93f494f6 7032458: Zero and Shark fixes
twisti
parents: 7397
diff changeset
    76
                                                BasicType *sig_bt,
535a93f494f6 7032458: Zero and Shark fixes
twisti
parents: 7397
diff changeset
    77
                                                VMRegPair *regs,
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    78
                                                BasicType ret_type) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    79
  ShouldNotCallThis();
19336
ddceb0657500 8022956: Clang: enable return type warnings on BSD
twisti
parents: 14294
diff changeset
    80
  return NULL;
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    81
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    82
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    83
int Deoptimization::last_frame_adjust(int callee_parameters,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    84
                                      int callee_locals) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    85
  return 0;
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    86
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    87
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    88
uint SharedRuntime::out_preserve_stack_slots() {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    89
  ShouldNotCallThis();
19336
ddceb0657500 8022956: Clang: enable return type warnings on BSD
twisti
parents: 14294
diff changeset
    90
  return 0;
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    91
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    92
14294
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    93
JRT_LEAF(void, zero_stub())
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    94
  ShouldNotCallThis();
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    95
JRT_END
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    96
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    97
static RuntimeStub* generate_empty_runtime_stub(const char* name) {
14294
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
    98
  return CAST_FROM_FN_PTR(RuntimeStub*,zero_stub);
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
    99
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   100
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   101
static SafepointBlob* generate_empty_safepoint_blob() {
14294
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
   102
  return CAST_FROM_FN_PTR(SafepointBlob*,zero_stub);
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   103
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   104
10260
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   105
static DeoptimizationBlob* generate_empty_deopt_blob() {
14294
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
   106
  return CAST_FROM_FN_PTR(DeoptimizationBlob*,zero_stub);
10260
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   107
}
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   108
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   109
10260
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   110
void SharedRuntime::generate_deopt_blob() {
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   111
  _deopt_blob = generate_empty_deopt_blob();
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   112
}
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   113
14294
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
   114
SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_type) {
10260
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   115
  return generate_empty_safepoint_blob();
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   116
}
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   117
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   118
RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const char* name) {
b7007c4de557 7071823: Zero: zero/shark doesn't build after b147-fcs
twisti
parents: 9103
diff changeset
   119
  return generate_empty_runtime_stub("resolve_blob");
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   120
}
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   121
37439
e8970711113b 8145221: Use trampolines for i2i and i2c entries in Methods that are stored in CDS archive
ccheung
parents: 33593
diff changeset
   122
size_t SharedRuntime::trampoline_size() {
e8970711113b 8145221: Use trampolines for i2i and i2c entries in Methods that are stored in CDS archive
ccheung
parents: 33593
diff changeset
   123
  ShouldNotCallThis();
e8970711113b 8145221: Use trampolines for i2i and i2c entries in Methods that are stored in CDS archive
ccheung
parents: 33593
diff changeset
   124
  return 0;
e8970711113b 8145221: Use trampolines for i2i and i2c entries in Methods that are stored in CDS archive
ccheung
parents: 33593
diff changeset
   125
}
e8970711113b 8145221: Use trampolines for i2i and i2c entries in Methods that are stored in CDS archive
ccheung
parents: 33593
diff changeset
   126
e8970711113b 8145221: Use trampolines for i2i and i2c entries in Methods that are stored in CDS archive
ccheung
parents: 33593
diff changeset
   127
void SharedRuntime::generate_trampoline(MacroAssembler *masm, address destination) {
e8970711113b 8145221: Use trampolines for i2i and i2c entries in Methods that are stored in CDS archive
ccheung
parents: 33593
diff changeset
   128
  ShouldNotCallThis();
e8970711113b 8145221: Use trampolines for i2i and i2c entries in Methods that are stored in CDS archive
ccheung
parents: 33593
diff changeset
   129
  return;
e8970711113b 8145221: Use trampolines for i2i and i2c entries in Methods that are stored in CDS archive
ccheung
parents: 33593
diff changeset
   130
}
14294
130e947dfbe6 8000780: make Zero build and run with JDK8
twisti
parents: 13728
diff changeset
   131
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   132
int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   133
                                         VMRegPair *regs,
22832
03720a5b7595 8024344: PPC64 (part 112): C argument in register AND stack slot.
goetz
parents: 19336
diff changeset
   134
                                         VMRegPair *regs2,
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   135
                                         int total_args_passed) {
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   136
  ShouldNotCallThis();
19336
ddceb0657500 8022956: Clang: enable return type warnings on BSD
twisti
parents: 14294
diff changeset
   137
  return 0;
4013
b154310845de 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
   138
}