src/hotspot/cpu/s390/c1_FrameMap_s390.hpp
author coleenp
Thu, 10 Jan 2019 15:13:51 -0500
changeset 53244 9807daeb47c4
parent 47216 71c04702a3d5
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: 47216
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: 47216
diff changeset
    26
#ifndef CPU_S390_C1_FRAMEMAP_S390_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47216
diff changeset
    27
#define CPU_S390_C1_FRAMEMAP_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
 public:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    30
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    31
  enum {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    32
    nof_reg_args = 5,   // Registers Z_ARG1 - Z_ARG5 are available for parameter passing.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    33
    first_available_sp_in_frame = frame::z_abi_16_size,
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    34
    frame_pad_in_bytes = 0
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    35
  };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    36
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    37
  static const int pd_c_runtime_reserved_arg_size;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    38
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    39
  static LIR_Opr Z_R0_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    40
  static LIR_Opr Z_R1_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    41
  static LIR_Opr Z_R2_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    42
  static LIR_Opr Z_R3_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    43
  static LIR_Opr Z_R4_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    44
  static LIR_Opr Z_R5_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    45
  static LIR_Opr Z_R6_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    46
  static LIR_Opr Z_R7_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    47
  static LIR_Opr Z_R8_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    48
  static LIR_Opr Z_R9_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    49
  static LIR_Opr Z_R10_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    50
  static LIR_Opr Z_R11_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    51
  static LIR_Opr Z_R12_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    52
  static LIR_Opr Z_R13_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    53
  static LIR_Opr Z_R14_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    54
  static LIR_Opr Z_R15_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    55
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    56
  static LIR_Opr Z_R0_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    57
  static LIR_Opr Z_R1_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    58
  static LIR_Opr Z_R2_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    59
  static LIR_Opr Z_R3_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    60
  static LIR_Opr Z_R4_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    61
  static LIR_Opr Z_R5_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    62
  static LIR_Opr Z_R6_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    63
  static LIR_Opr Z_R7_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    64
  static LIR_Opr Z_R8_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    65
  static LIR_Opr Z_R9_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    66
  static LIR_Opr Z_R10_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    67
  static LIR_Opr Z_R11_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    68
  static LIR_Opr Z_R12_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    69
  static LIR_Opr Z_R13_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    70
  static LIR_Opr Z_R14_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    71
  static LIR_Opr Z_R15_oop_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    72
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    73
  static LIR_Opr Z_R0_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    74
  static LIR_Opr Z_R1_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    75
  static LIR_Opr Z_R2_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    76
  static LIR_Opr Z_R3_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    77
  static LIR_Opr Z_R4_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    78
  static LIR_Opr Z_R5_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    79
  static LIR_Opr Z_R6_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    80
  static LIR_Opr Z_R7_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    81
  static LIR_Opr Z_R8_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    82
  static LIR_Opr Z_R9_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    83
  static LIR_Opr Z_R10_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    84
  static LIR_Opr Z_R11_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    85
  static LIR_Opr Z_R12_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    86
  static LIR_Opr Z_R13_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    87
  static LIR_Opr Z_R14_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    88
  static LIR_Opr Z_R15_metadata_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    89
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    90
  static LIR_Opr Z_SP_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    91
  static LIR_Opr Z_FP_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    92
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    93
  static LIR_Opr Z_R2_long_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    94
  static LIR_Opr Z_R10_long_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    95
  static LIR_Opr Z_R11_long_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    96
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    97
  static LIR_Opr Z_F0_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    98
  static LIR_Opr Z_F0_double_opr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    99
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   100
 private:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   101
  static FloatRegister _fpu_rnr2reg [FrameMap::nof_fpu_regs]; // mapping c1 regnr. -> FloatRegister
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   102
  static int           _fpu_reg2rnr [FrameMap::nof_fpu_regs]; // mapping assembler encoding -> c1 regnr.
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   103
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   104
  static void map_float_register(int rnr, FloatRegister reg);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   105
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   106
  // FloatRegister -> c1 rnr
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   107
  static int fpu_reg2rnr (FloatRegister reg) {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   108
    assert(_init_done, "tables not initialized");
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   109
    int c1rnr = _fpu_reg2rnr[reg->encoding()];
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   110
    debug_only(fpu_range_check(c1rnr);)
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   111
    return c1rnr;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   112
  }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   113
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   114
 public:
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   115
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   116
  static LIR_Opr as_long_opr(Register r) {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   117
    return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r));
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   118
  }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   119
  static LIR_Opr as_pointer_opr(Register r) {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   120
    return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r));
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   121
  }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   122
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   123
  static LIR_Opr as_float_opr(FloatRegister r) {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   124
    return LIR_OprFact::single_fpu(fpu_reg2rnr(r));
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   125
  }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   126
  static LIR_Opr as_double_opr(FloatRegister r) {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   127
    return LIR_OprFact::double_fpu(fpu_reg2rnr(r));
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   128
  }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   129
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   130
  static FloatRegister nr2floatreg (int rnr);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   131
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   132
  static VMReg fpu_regname (int n);
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   133
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   134
  // No callee saved registers (saved values are not accessible if callee is in runtime).
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   135
  static bool is_caller_save_register (LIR_Opr opr) { return true; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   136
  static bool is_caller_save_register (Register r) { return true; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   137
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   138
  static int nof_caller_save_cpu_regs() { return pd_nof_caller_save_cpu_regs_frame_map; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   139
  static int last_cpu_reg()             { return pd_last_cpu_reg; }
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
   140
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47216
diff changeset
   141
#endif // CPU_S390_C1_FRAMEMAP_S390_HPP