src/hotspot/cpu/s390/c1_MacroAssembler_s390.hpp
author coleenp
Thu, 10 Jan 2019 15:13:51 -0500
changeset 53244 9807daeb47c4
parent 50423 82599d53dd6d
child 57777 90ead0febf56
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:
42065
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50423
diff changeset
     2
 * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
42065
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     3
 * Copyright (c) 2016 SAP SE. All rights reserved.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     5
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     8
 * published by the Free Software Foundation.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     9
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    14
 * accompanied this code).
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    15
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    19
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    22
 * questions.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    23
 *
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    24
 */
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    25
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50423
diff changeset
    26
#ifndef CPU_S390_C1_MACROASSEMBLER_S390_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50423
diff changeset
    27
#define CPU_S390_C1_MACROASSEMBLER_S390_HPP
42065
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    28
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    29
  void pd_init() { /* nothing to do */ }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    30
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    31
 public:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    32
  void try_allocate(
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    33
    Register obj,                      // result: Pointer to object after successful allocation.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    34
    Register var_size_in_bytes,        // Object size in bytes if unknown at compile time; invalid otherwise.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    35
    int      con_size_in_bytes,        // Object size in bytes if   known at compile time.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    36
    Register t1,                       // temp register
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    37
    Label&   slow_case                 // Continuation point if fast allocation fails.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    38
  );
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    39
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    40
  void initialize_header(Register obj, Register klass, Register len, Register Rzero, Register t1);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    41
  void initialize_body(Register objectFields, Register len_in_bytes, Register Rzero);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    42
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    43
  // locking
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    44
  // hdr     : Used to hold locked markOop to be CASed into obj, contents destroyed.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    45
  // obj     : Must point to the object to lock, contents preserved.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    46
  // disp_hdr: Must point to the displaced header location, contents preserved.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    47
  // Returns code offset at which to add null check debug information.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    48
  void lock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    49
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    50
  // unlocking
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    51
  // hdr     : Used to hold original markOop to be CASed back into obj, contents destroyed.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    52
  // obj     : Must point to the object to lock, contents preserved.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    53
  // disp_hdr: Must point to the displaced header location, contents destroyed.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    54
  void unlock_object(Register hdr, Register obj, Register lock, Label& slow_case);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    55
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    56
  void initialize_object(
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    57
    Register obj,                      // result: Pointer to object after successful allocation.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    58
    Register klass,                    // object klass
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    59
    Register var_size_in_bytes,        // Object size in bytes if unknown at compile time; invalid otherwise.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    60
    int      con_size_in_bytes,        // Object size in bytes if   known at compile time.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    61
    Register t1,                       // temp register
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    62
    Register t2                        // temp register
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    63
  );
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    64
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    65
  // Allocation of fixed-size objects.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    66
  // This can also be used to allocate fixed-size arrays, by setting
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    67
  // hdr_size correctly and storing the array length afterwards.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    68
  void allocate_object(
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    69
    Register obj,                      // result: Pointer to object after successful allocation.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    70
    Register t1,                       // temp register
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    71
    Register t2,                       // temp register
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    72
    int      hdr_size,                 // object header size in words
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    73
    int      obj_size,                 // object size in words
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    74
    Register klass,                    // object klass
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    75
    Label&   slow_case                 // Continuation point if fast allocation fails.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    76
  );
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    77
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    78
  enum {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    79
    max_array_allocation_length = 0x01000000 // Sparc friendly value, requires sethi only.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    80
  };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    81
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    82
  // Allocation of arrays.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    83
  void allocate_array(
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    84
    Register obj,                      // result: Pointer to array after successful allocation.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    85
    Register len,                      // array length
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    86
    Register t1,                       // temp register
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    87
    Register t2,                       // temp register
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    88
    int      hdr_size,                 // object header size in words
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    89
    int      elt_size,                 // element size in bytes
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    90
    Register klass,                    // object klass
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    91
    Label&   slow_case                 // Continuation point if fast allocation fails.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    92
  );
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    93
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    94
  // Invalidates registers in this window.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    95
  void invalidate_registers(Register preserve1 = noreg, Register preserve2 = noreg,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    96
                            Register preserve3 = noreg) PRODUCT_RETURN;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    97
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    98
  // This platform only uses signal-based null checks. The Label is not needed.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    99
  void null_check(Register r, Label *Lnull = NULL) { MacroAssembler::null_check(r); }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   100
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50423
diff changeset
   101
#endif // CPU_S390_C1_MACROASSEMBLER_S390_HPP