src/hotspot/cpu/s390/register_s390.cpp
author naoto
Tue, 09 Jul 2019 08:05:38 -0700
changeset 55627 9c1885fb2a42
parent 47531 6481d7b6c31e
permissions -rw-r--r--
8227127: Era designator not displayed correctly using the COMPAT provider Reviewed-by: rriggs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42065
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
     1
/*
47531
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
     2
 * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
     3
 * Copyright (c) 2016, 2017 SAP SE. All rights reserved.
42065
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
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    26
#include "precompiled.hpp"
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    27
#include "register_s390.hpp"
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    28
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    29
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    30
const int ConcreteRegisterImpl::max_gpr = RegisterImpl::number_of_registers * 2;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    31
const int ConcreteRegisterImpl::max_fpr = ConcreteRegisterImpl::max_gpr +
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    32
                                          FloatRegisterImpl::number_of_registers * 2;
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    33
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    34
const char* RegisterImpl::name() const {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    35
  const char* names[number_of_registers] = {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    36
    "Z_R0",  "Z_R1",  "Z_R2",  "Z_R3",  "Z_R4",  "Z_R5",  "Z_R6",  "Z_R7",
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    37
    "Z_R8",  "Z_R9",  "Z_R10", "Z_R11", "Z_R12", "Z_R13", "Z_R14", "Z_R15"
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    38
  };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    39
  return is_valid() ? names[encoding()] : "noreg";
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    40
}
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    41
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    42
const char* FloatRegisterImpl::name() const {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    43
  const char* names[number_of_registers] = {
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    44
    "Z_F0",  "Z_F1",   "Z_F2",  "Z_F3",   "Z_F4",  "Z_F5",   "Z_F6",  "Z_F7",   "Z_F8",  "Z_F9",
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    45
    "Z_F10", "Z_F11",  "Z_F12", "Z_F13",  "Z_F14", "Z_F15"
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    46
  };
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    47
  return is_valid() ? names[encoding()] : "fnoreg";
6032b31e3719 8167673: [s390] The s390 port.
goetz
parents:
diff changeset
    48
}
47531
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
    49
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
    50
const char* VectorRegisterImpl::name() const {
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
    51
  const char* names[number_of_registers] = {
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
    52
    "Z_V0",  "Z_V1",  "Z_V2",  "Z_V3",  "Z_V4",  "Z_V5",  "Z_V6",  "Z_V7",
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
    53
    "Z_V8",  "Z_V9",  "Z_V10", "Z_V11", "Z_V12", "Z_V13", "Z_V14", "Z_V15",
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
    54
    "Z_V16", "Z_V17", "Z_V18", "Z_V19", "Z_V20", "Z_V21", "Z_V22", "Z_V23",
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
    55
    "Z_V24", "Z_V25", "Z_V26", "Z_V27", "Z_V28", "Z_V29", "Z_V30", "Z_V31"
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
    56
  };
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
    57
  return is_valid() ? names[encoding()] : "fnoreg";
6481d7b6c31e 8187573: [s390] z/Architecture Vector Facility Support
lucy
parents: 47216
diff changeset
    58
}