src/hotspot/cpu/sparc/c1_MacroAssembler_sparc.hpp
author ihse
Mon, 26 Nov 2018 14:18:22 +0100
branchihse-manpages-branch
changeset 57043 23d7457ca4c6
parent 49906 4bb58f644e4e
child 53244 9807daeb47c4
permissions -rw-r--r--
Clean up login in when running which kind of man page creation.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
49906
4bb58f644e4e 8201543: Modularize C1 GC barriers
eosterlund
parents: 47216
diff changeset
     2
 * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#ifndef CPU_SPARC_VM_C1_MACROASSEMBLER_SPARC_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#define CPU_SPARC_VM_C1_MACROASSEMBLER_SPARC_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
  void pd_init() { /* nothing to do */ }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
   void try_allocate(
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
    Register obj,                      // result: pointer to object after successful allocation
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
    Register var_size_in_bytes,        // object size in bytes if unknown at compile time; invalid otherwise
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
    int      con_size_in_bytes,        // object size in bytes if   known at compile time
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
    Register t1,                       // temp register
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
    Register t2,                       // temp register
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
    Label&   slow_case                 // continuation point if fast allocation fails
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  void initialize_header(Register obj, Register klass, Register len, Register t1, Register t2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  void initialize_body(Register base, Register index);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  // locking/unlocking
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
  void lock_object  (Register Rmark, Register Roop, Register Rbox, Register Rscratch, Label& slow_case);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  void unlock_object(Register Rmark, Register Roop, Register Rbox,                    Label& slow_case);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
  void initialize_object(
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
    Register obj,                      // result: pointer to object after successful allocation
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
    Register klass,                    // object klass
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
    Register var_size_in_bytes,        // object size in bytes if unknown at compile time; invalid otherwise
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
    int      con_size_in_bytes,        // object size in bytes if   known at compile time
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
    Register t1,                       // temp register
35548
8d3afe96ffea 8086053: Address inconsistencies regarding ZeroTLAB
zmajo
parents: 34220
diff changeset
    53
    Register t2,                       // temp register
8d3afe96ffea 8086053: Address inconsistencies regarding ZeroTLAB
zmajo
parents: 34220
diff changeset
    54
    bool is_tlab_allocated             // the object was allocated in a TLAB; relevant for the implementation of ZeroTLAB
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
  // allocation of fixed-size objects
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  // (can also be used to allocate fixed-size arrays, by setting
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  // hdr_size correctly and storing the array length afterwards)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
  void allocate_object(
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
    Register obj,                      // result: pointer to object after successful allocation
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
    Register t1,                       // temp register
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
    Register t2,                       // temp register
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
    Register t3,                       // temp register
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
    int      hdr_size,                 // object header size in words
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
    int      obj_size,                 // object size in words
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
    Register klass,                    // object klass
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
    Label&   slow_case                 // continuation point if fast allocation fails
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  enum {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
    max_array_allocation_length = 0x01000000 // sparc friendly value, requires sethi only
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  // allocation of arrays
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  void allocate_array(
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
    Register obj,                      // result: pointer to array after successful allocation
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
    Register len,                      // array length
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
    Register t1,                       // temp register
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
    Register t2,                       // temp register
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
    Register t3,                       // temp register
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
    int      hdr_size,                 // object header size in words
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
    int      elt_size,                 // element size in bytes
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
    Register klass,                    // object klass
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
    Label&   slow_case                 // continuation point if fast allocation fails
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  );
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  // invalidates registers in this window
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  void invalidate_registers(bool iregisters, bool lregisters, bool oregisters,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
                            Register preserve1 = noreg, Register preserve2 = noreg);
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    91
34220
1ba69cb5585c 8138952: C1: Distinguish between PPC32 and PPC64
mdoerr
parents: 7724
diff changeset
    92
  // This platform only uses signal-based null checks. The Label is not needed.
1ba69cb5585c 8138952: C1: Distinguish between PPC32 and PPC64
mdoerr
parents: 7724
diff changeset
    93
  void null_check(Register r, Label *Lnull = NULL) { MacroAssembler::null_check(r); }
1ba69cb5585c 8138952: C1: Distinguish between PPC32 and PPC64
mdoerr
parents: 7724
diff changeset
    94
49906
4bb58f644e4e 8201543: Modularize C1 GC barriers
eosterlund
parents: 47216
diff changeset
    95
  void save_live_registers_no_oop_map(bool save_fpu_registers);
4bb58f644e4e 8201543: Modularize C1 GC barriers
eosterlund
parents: 47216
diff changeset
    96
  void restore_live_registers(bool restore_fpu_registers);
4bb58f644e4e 8201543: Modularize C1 GC barriers
eosterlund
parents: 47216
diff changeset
    97
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    98
#endif // CPU_SPARC_VM_C1_MACROASSEMBLER_SPARC_HPP