src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.hpp
author chegar
Thu, 17 Oct 2019 20:54:25 +0100
branchdatagramsocketimpl-branch
changeset 58679 9c3209ff7550
parent 58678 9cf78a70fa4f
parent 58516 d376d86b0a01
permissions -rw-r--r--
datagramsocketimpl-branch: merge with default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55379
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
     1
/*
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
     2
 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
     4
 *
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
     7
 * published by the Free Software Foundation.
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
     8
 *
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    13
 * accompanied this code).
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    14
 *
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    18
 *
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    21
 * questions.
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    22
 */
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    23
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    24
#ifndef CPU_AARCH64_GC_Z_ZBARRIERSETASSEMBLER_AARCH64_HPP
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    25
#define CPU_AARCH64_GC_Z_ZBARRIERSETASSEMBLER_AARCH64_HPP
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    26
58516
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    27
#include "code/vmreg.hpp"
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    28
#include "oops/accessDecorators.hpp"
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    29
#ifdef COMPILER2
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    30
#include "opto/optoreg.hpp"
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    31
#endif // COMPILER2
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    32
55379
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    33
#ifdef COMPILER1
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    34
class LIR_Assembler;
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    35
class LIR_OprDesc;
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    36
typedef LIR_OprDesc* LIR_Opr;
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    37
class StubAssembler;
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    38
class ZLoadBarrierStubC1;
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    39
#endif // COMPILER1
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    40
58516
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    41
#ifdef COMPILER2
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    42
class Node;
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    43
class ZLoadBarrierStubC2;
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    44
#endif // COMPILER2
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    45
55379
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    46
class ZBarrierSetAssembler : public ZBarrierSetAssemblerBase {
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    47
public:
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    48
  virtual void load_at(MacroAssembler* masm,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    49
                       DecoratorSet decorators,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    50
                       BasicType type,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    51
                       Register dst,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    52
                       Address src,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    53
                       Register tmp1,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    54
                       Register tmp_thread);
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    55
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    56
#ifdef ASSERT
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    57
  virtual void store_at(MacroAssembler* masm,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    58
                        DecoratorSet decorators,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    59
                        BasicType type,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    60
                        Address dst,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    61
                        Register val,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    62
                        Register tmp1,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    63
                        Register tmp2);
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    64
#endif // ASSERT
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    65
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    66
  virtual void arraycopy_prologue(MacroAssembler* masm,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    67
                                  DecoratorSet decorators,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    68
                                  bool is_oop,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    69
                                  Register src,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    70
                                  Register dst,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    71
                                  Register count,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    72
                                  RegSet saved_regs);
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    73
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    74
  virtual void try_resolve_jobject_in_native(MacroAssembler* masm,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    75
                                             Register jni_env,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    76
                                             Register robj,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    77
                                             Register tmp,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    78
                                             Label& slowpath);
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    79
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    80
#ifdef COMPILER1
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    81
  void generate_c1_load_barrier_test(LIR_Assembler* ce,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    82
                                     LIR_Opr ref) const;
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    83
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    84
  void generate_c1_load_barrier_stub(LIR_Assembler* ce,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    85
                                     ZLoadBarrierStubC1* stub) const;
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    86
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    87
  void generate_c1_load_barrier_runtime_stub(StubAssembler* sasm,
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    88
                                             DecoratorSet decorators) const;
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    89
#endif // COMPILER1
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    90
58516
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    91
#ifdef COMPILER2
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    92
  OptoReg::Name refine_register(const Node* node,
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    93
                                OptoReg::Name opto_reg);
55379
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    94
58516
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    95
  void generate_c2_load_barrier_stub(MacroAssembler* masm,
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    96
                                     ZLoadBarrierStubC2* stub) const;
d376d86b0a01 8230565: ZGC: Redesign C2 load barrier to expand on the MachNode level
eosterlund
parents: 55379
diff changeset
    97
#endif // COMPILER2
55379
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    98
};
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
    99
865775b86780 8214527: ZGC for Aarch64
smonteith
parents:
diff changeset
   100
#endif // CPU_AARCH64_GC_Z_ZBARRIERSETASSEMBLER_AARCH64_HPP