hotspot/src/cpu/ppc/vm/register_ppc.hpp
author mdoerr
Mon, 14 Aug 2017 16:48:44 +0200
changeset 46809 057f21a10f5f
parent 40071 53e12df44b7b
permissions -rw-r--r--
8185969: PPC64: Improve VSR support to use up to 64 registers Reviewed-by: mdoerr, goetz Contributed-by: Gustavo Serra Scalet <gustavo.scalet@eldorado.org.br>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     1
/*
46809
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
     2
 * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
     3
 * Copyright (c) 2012, 2017 SAP SE. All rights reserved.
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     5
 *
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     8
 * published by the Free Software Foundation.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
     9
 *
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    14
 * accompanied this code).
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    15
 *
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    19
 *
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    22
 * questions.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    23
 *
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    24
 */
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    25
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    26
#ifndef CPU_PPC_VM_REGISTER_PPC_HPP
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    27
#define CPU_PPC_VM_REGISTER_PPC_HPP
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    28
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    29
#include "asm/register.hpp"
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    30
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    31
// forward declaration
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    32
class Address;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    33
class VMRegImpl;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    34
typedef VMRegImpl* VMReg;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    35
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    36
//  PPC64 registers
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    37
//
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    38
//  See "64-bit PowerPC ELF ABI Supplement 1.7", IBM Corp. (2003-10-29).
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    39
//  (http://math-atlas.sourceforge.net/devel/assembly/PPC-elf64abi-1.7.pdf)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    40
//
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    41
//  r0        Register used in function prologs (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    42
//  r1        Stack pointer (nonvolatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    43
//  r2        TOC pointer (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    44
//  r3        Parameter and return value (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    45
//  r4-r10    Function parameters (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    46
//  r11       Register used in calls by pointer and as an environment pointer for languages which require one (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    47
//  r12       Register used for exception handling and glink code (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    48
//  r13       Reserved for use as system thread ID
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    49
//  r14-r31   Local variables (nonvolatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    50
//
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    51
//  f0        Scratch register (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    52
//  f1-f4     Floating point parameters and return value (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    53
//  f5-f13    Floating point parameters (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    54
//  f14-f31   Floating point values (nonvolatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    55
//
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    56
//  LR        Link register for return address (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    57
//  CTR       Loop counter (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    58
//  XER       Fixed point exception register (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    59
//  FPSCR     Floating point status and control register (volatile)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    60
//
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    61
//  CR0-CR1   Condition code fields (volatile)
22861
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents: 22824
diff changeset
    62
//  CR2-CR4   Condition code fields (nonvolatile)
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents: 22824
diff changeset
    63
//  CR5-CR7   Condition code fields (volatile)
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    64
//
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    65
//  ----------------------------------------------
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    66
//  On processors with the VMX feature:
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    67
//  v0-v1     Volatile scratch registers
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    68
//  v2-v13    Volatile vector parameters registers
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    69
//  v14-v19   Volatile scratch registers
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    70
//  v20-v31   Non-volatile registers
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    71
//  vrsave    Non-volatile 32-bit register
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    72
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    73
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    74
// Use Register as shortcut
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    75
class RegisterImpl;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    76
typedef RegisterImpl* Register;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    77
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    78
inline Register as_Register(int encoding) {
40071
53e12df44b7b 8160245: C1: Clean up platform #defines in c1_LIR.hpp.
goetz
parents: 39236
diff changeset
    79
  assert(encoding >= -1 && encoding < 32, "bad register encoding");
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    80
  return (Register)(intptr_t)encoding;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    81
}
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    82
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    83
// The implementation of integer registers for the Power architecture
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    84
class RegisterImpl: public AbstractRegisterImpl {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    85
 public:
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    86
  enum {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    87
    number_of_registers = 32
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    88
  };
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    89
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    90
  // general construction
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    91
  inline friend Register as_Register(int encoding);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    92
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    93
  // accessors
40071
53e12df44b7b 8160245: C1: Clean up platform #defines in c1_LIR.hpp.
goetz
parents: 39236
diff changeset
    94
  int encoding() const { assert(is_valid(), "invalid register"); return value(); }
25715
d5a8dbdc5150 8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
goetz
parents: 23221
diff changeset
    95
  inline VMReg as_VMReg();
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    96
  Register successor() const { return as_Register(encoding() + 1); }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    97
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    98
  // testers
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
    99
  bool is_valid()       const { return ( 0 <= (value()&0x7F) && (value()&0x7F) <  number_of_registers); }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   100
  bool is_volatile()    const { return ( 0 <= (value()&0x7F) && (value()&0x7F) <= 13 ); }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   101
  bool is_nonvolatile() const { return (14 <= (value()&0x7F) && (value()&0x7F) <= 31 ); }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   102
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   103
  const char* name() const;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   104
};
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   105
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   106
// The integer registers of the PPC architecture
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   107
CONSTANT_REGISTER_DECLARATION(Register, noreg, (-1));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   108
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   109
CONSTANT_REGISTER_DECLARATION(Register, R0,   (0));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   110
CONSTANT_REGISTER_DECLARATION(Register, R1,   (1));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   111
CONSTANT_REGISTER_DECLARATION(Register, R2,   (2));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   112
CONSTANT_REGISTER_DECLARATION(Register, R3,   (3));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   113
CONSTANT_REGISTER_DECLARATION(Register, R4,   (4));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   114
CONSTANT_REGISTER_DECLARATION(Register, R5,   (5));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   115
CONSTANT_REGISTER_DECLARATION(Register, R6,   (6));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   116
CONSTANT_REGISTER_DECLARATION(Register, R7,   (7));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   117
CONSTANT_REGISTER_DECLARATION(Register, R8,   (8));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   118
CONSTANT_REGISTER_DECLARATION(Register, R9,   (9));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   119
CONSTANT_REGISTER_DECLARATION(Register, R10, (10));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   120
CONSTANT_REGISTER_DECLARATION(Register, R11, (11));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   121
CONSTANT_REGISTER_DECLARATION(Register, R12, (12));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   122
CONSTANT_REGISTER_DECLARATION(Register, R13, (13));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   123
CONSTANT_REGISTER_DECLARATION(Register, R14, (14));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   124
CONSTANT_REGISTER_DECLARATION(Register, R15, (15));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   125
CONSTANT_REGISTER_DECLARATION(Register, R16, (16));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   126
CONSTANT_REGISTER_DECLARATION(Register, R17, (17));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   127
CONSTANT_REGISTER_DECLARATION(Register, R18, (18));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   128
CONSTANT_REGISTER_DECLARATION(Register, R19, (19));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   129
CONSTANT_REGISTER_DECLARATION(Register, R20, (20));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   130
CONSTANT_REGISTER_DECLARATION(Register, R21, (21));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   131
CONSTANT_REGISTER_DECLARATION(Register, R22, (22));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   132
CONSTANT_REGISTER_DECLARATION(Register, R23, (23));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   133
CONSTANT_REGISTER_DECLARATION(Register, R24, (24));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   134
CONSTANT_REGISTER_DECLARATION(Register, R25, (25));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   135
CONSTANT_REGISTER_DECLARATION(Register, R26, (26));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   136
CONSTANT_REGISTER_DECLARATION(Register, R27, (27));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   137
CONSTANT_REGISTER_DECLARATION(Register, R28, (28));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   138
CONSTANT_REGISTER_DECLARATION(Register, R29, (29));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   139
CONSTANT_REGISTER_DECLARATION(Register, R30, (30));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   140
CONSTANT_REGISTER_DECLARATION(Register, R31, (31));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   141
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   142
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   143
//
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   144
// Because Power has many registers, #define'ing values for them is
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   145
// beneficial in code size and is worth the cost of some of the
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   146
// dangers of defines. If a particular file has a problem with these
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   147
// defines then it's possible to turn them off in that file by
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   148
// defining DONT_USE_REGISTER_DEFINES. Register_definition_ppc.cpp
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   149
// does that so that it's able to provide real definitions of these
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   150
// registers for use in debuggers and such.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   151
//
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   152
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   153
#ifndef DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   154
#define noreg ((Register)(noreg_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   155
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   156
#define R0 ((Register)(R0_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   157
#define R1 ((Register)(R1_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   158
#define R2 ((Register)(R2_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   159
#define R3 ((Register)(R3_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   160
#define R4 ((Register)(R4_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   161
#define R5 ((Register)(R5_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   162
#define R6 ((Register)(R6_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   163
#define R7 ((Register)(R7_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   164
#define R8 ((Register)(R8_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   165
#define R9 ((Register)(R9_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   166
#define R10 ((Register)(R10_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   167
#define R11 ((Register)(R11_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   168
#define R12 ((Register)(R12_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   169
#define R13 ((Register)(R13_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   170
#define R14 ((Register)(R14_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   171
#define R15 ((Register)(R15_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   172
#define R16 ((Register)(R16_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   173
#define R17 ((Register)(R17_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   174
#define R18 ((Register)(R18_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   175
#define R19 ((Register)(R19_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   176
#define R20 ((Register)(R20_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   177
#define R21 ((Register)(R21_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   178
#define R22 ((Register)(R22_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   179
#define R23 ((Register)(R23_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   180
#define R24 ((Register)(R24_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   181
#define R25 ((Register)(R25_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   182
#define R26 ((Register)(R26_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   183
#define R27 ((Register)(R27_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   184
#define R28 ((Register)(R28_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   185
#define R29 ((Register)(R29_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   186
#define R30 ((Register)(R30_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   187
#define R31 ((Register)(R31_RegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   188
#endif
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   189
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   190
// Use ConditionRegister as shortcut
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   191
class ConditionRegisterImpl;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   192
typedef ConditionRegisterImpl* ConditionRegister;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   193
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   194
inline ConditionRegister as_ConditionRegister(int encoding) {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   195
  assert(encoding >= 0 && encoding < 8, "bad condition register encoding");
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   196
  return (ConditionRegister)(intptr_t)encoding;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   197
}
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   198
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   199
// The implementation of condition register(s) for the PPC architecture
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   200
class ConditionRegisterImpl: public AbstractRegisterImpl {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   201
 public:
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   202
  enum {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   203
    number_of_registers = 8
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   204
  };
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   205
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   206
  // construction.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   207
  inline friend ConditionRegister as_ConditionRegister(int encoding);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   208
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   209
  // accessors
25715
d5a8dbdc5150 8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
goetz
parents: 23221
diff changeset
   210
  int encoding() const { assert(is_valid(), "invalid register"); return value(); }
d5a8dbdc5150 8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
goetz
parents: 23221
diff changeset
   211
  inline VMReg as_VMReg();
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   212
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   213
  // testers
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   214
  bool is_valid()       const { return  (0 <= value()        &&  value() < number_of_registers); }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   215
  bool is_nonvolatile() const { return  (2 <= (value()&0x7F) && (value()&0x7F) <= 4 );  }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   216
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   217
  const char* name() const;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   218
};
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   219
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   220
// The (parts of the) condition register(s) of the PPC architecture
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   221
// sys/ioctl.h on AIX defines CR0-CR3, so I name these CCR.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   222
CONSTANT_REGISTER_DECLARATION(ConditionRegister, CCR0,   (0));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   223
CONSTANT_REGISTER_DECLARATION(ConditionRegister, CCR1,   (1));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   224
CONSTANT_REGISTER_DECLARATION(ConditionRegister, CCR2,   (2));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   225
CONSTANT_REGISTER_DECLARATION(ConditionRegister, CCR3,   (3));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   226
CONSTANT_REGISTER_DECLARATION(ConditionRegister, CCR4,   (4));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   227
CONSTANT_REGISTER_DECLARATION(ConditionRegister, CCR5,   (5));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   228
CONSTANT_REGISTER_DECLARATION(ConditionRegister, CCR6,   (6));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   229
CONSTANT_REGISTER_DECLARATION(ConditionRegister, CCR7,   (7));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   230
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   231
#ifndef DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   232
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   233
#define CCR0 ((ConditionRegister)(CCR0_ConditionRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   234
#define CCR1 ((ConditionRegister)(CCR1_ConditionRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   235
#define CCR2 ((ConditionRegister)(CCR2_ConditionRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   236
#define CCR3 ((ConditionRegister)(CCR3_ConditionRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   237
#define CCR4 ((ConditionRegister)(CCR4_ConditionRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   238
#define CCR5 ((ConditionRegister)(CCR5_ConditionRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   239
#define CCR6 ((ConditionRegister)(CCR6_ConditionRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   240
#define CCR7 ((ConditionRegister)(CCR7_ConditionRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   241
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   242
#endif // DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   243
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   244
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   245
// Use FloatRegister as shortcut
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   246
class FloatRegisterImpl;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   247
typedef FloatRegisterImpl* FloatRegister;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   248
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   249
inline FloatRegister as_FloatRegister(int encoding) {
40071
53e12df44b7b 8160245: C1: Clean up platform #defines in c1_LIR.hpp.
goetz
parents: 39236
diff changeset
   250
  assert(encoding >= -1 && encoding < 32, "bad float register encoding");
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   251
  return (FloatRegister)(intptr_t)encoding;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   252
}
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   253
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   254
// The implementation of float registers for the PPC architecture
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   255
class FloatRegisterImpl: public AbstractRegisterImpl {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   256
 public:
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   257
  enum {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   258
    number_of_registers = 32
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   259
  };
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   260
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   261
  // construction
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   262
  inline friend FloatRegister as_FloatRegister(int encoding);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   263
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   264
  // accessors
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   265
  int           encoding() const { assert(is_valid(), "invalid register"); return value(); }
25715
d5a8dbdc5150 8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
goetz
parents: 23221
diff changeset
   266
  inline VMReg  as_VMReg();
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   267
  FloatRegister successor() const { return as_FloatRegister(encoding() + 1); }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   268
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   269
  // testers
40071
53e12df44b7b 8160245: C1: Clean up platform #defines in c1_LIR.hpp.
goetz
parents: 39236
diff changeset
   270
  bool is_valid() const { return (0 <= value() && value() < number_of_registers); }
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   271
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   272
  const char* name() const;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   273
};
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   274
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   275
// The float registers of the PPC architecture
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   276
CONSTANT_REGISTER_DECLARATION(FloatRegister, fnoreg, (-1));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   277
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   278
CONSTANT_REGISTER_DECLARATION(FloatRegister, F0,  ( 0));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   279
CONSTANT_REGISTER_DECLARATION(FloatRegister, F1,  ( 1));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   280
CONSTANT_REGISTER_DECLARATION(FloatRegister, F2,  ( 2));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   281
CONSTANT_REGISTER_DECLARATION(FloatRegister, F3,  ( 3));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   282
CONSTANT_REGISTER_DECLARATION(FloatRegister, F4,  ( 4));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   283
CONSTANT_REGISTER_DECLARATION(FloatRegister, F5,  ( 5));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   284
CONSTANT_REGISTER_DECLARATION(FloatRegister, F6,  ( 6));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   285
CONSTANT_REGISTER_DECLARATION(FloatRegister, F7,  ( 7));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   286
CONSTANT_REGISTER_DECLARATION(FloatRegister, F8,  ( 8));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   287
CONSTANT_REGISTER_DECLARATION(FloatRegister, F9,  ( 9));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   288
CONSTANT_REGISTER_DECLARATION(FloatRegister, F10, (10));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   289
CONSTANT_REGISTER_DECLARATION(FloatRegister, F11, (11));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   290
CONSTANT_REGISTER_DECLARATION(FloatRegister, F12, (12));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   291
CONSTANT_REGISTER_DECLARATION(FloatRegister, F13, (13));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   292
CONSTANT_REGISTER_DECLARATION(FloatRegister, F14, (14));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   293
CONSTANT_REGISTER_DECLARATION(FloatRegister, F15, (15));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   294
CONSTANT_REGISTER_DECLARATION(FloatRegister, F16, (16));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   295
CONSTANT_REGISTER_DECLARATION(FloatRegister, F17, (17));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   296
CONSTANT_REGISTER_DECLARATION(FloatRegister, F18, (18));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   297
CONSTANT_REGISTER_DECLARATION(FloatRegister, F19, (19));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   298
CONSTANT_REGISTER_DECLARATION(FloatRegister, F20, (20));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   299
CONSTANT_REGISTER_DECLARATION(FloatRegister, F21, (21));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   300
CONSTANT_REGISTER_DECLARATION(FloatRegister, F22, (22));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   301
CONSTANT_REGISTER_DECLARATION(FloatRegister, F23, (23));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   302
CONSTANT_REGISTER_DECLARATION(FloatRegister, F24, (24));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   303
CONSTANT_REGISTER_DECLARATION(FloatRegister, F25, (25));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   304
CONSTANT_REGISTER_DECLARATION(FloatRegister, F26, (26));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   305
CONSTANT_REGISTER_DECLARATION(FloatRegister, F27, (27));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   306
CONSTANT_REGISTER_DECLARATION(FloatRegister, F28, (28));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   307
CONSTANT_REGISTER_DECLARATION(FloatRegister, F29, (29));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   308
CONSTANT_REGISTER_DECLARATION(FloatRegister, F30, (30));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   309
CONSTANT_REGISTER_DECLARATION(FloatRegister, F31, (31));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   310
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   311
#ifndef DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   312
#define fnoreg ((FloatRegister)(fnoreg_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   313
#define F0     ((FloatRegister)(    F0_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   314
#define F1     ((FloatRegister)(    F1_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   315
#define F2     ((FloatRegister)(    F2_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   316
#define F3     ((FloatRegister)(    F3_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   317
#define F4     ((FloatRegister)(    F4_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   318
#define F5     ((FloatRegister)(    F5_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   319
#define F6     ((FloatRegister)(    F6_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   320
#define F7     ((FloatRegister)(    F7_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   321
#define F8     ((FloatRegister)(    F8_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   322
#define F9     ((FloatRegister)(    F9_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   323
#define F10    ((FloatRegister)(   F10_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   324
#define F11    ((FloatRegister)(   F11_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   325
#define F12    ((FloatRegister)(   F12_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   326
#define F13    ((FloatRegister)(   F13_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   327
#define F14    ((FloatRegister)(   F14_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   328
#define F15    ((FloatRegister)(   F15_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   329
#define F16    ((FloatRegister)(   F16_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   330
#define F17    ((FloatRegister)(   F17_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   331
#define F18    ((FloatRegister)(   F18_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   332
#define F19    ((FloatRegister)(   F19_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   333
#define F20    ((FloatRegister)(   F20_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   334
#define F21    ((FloatRegister)(   F21_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   335
#define F22    ((FloatRegister)(   F22_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   336
#define F23    ((FloatRegister)(   F23_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   337
#define F24    ((FloatRegister)(   F24_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   338
#define F25    ((FloatRegister)(   F25_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   339
#define F26    ((FloatRegister)(   F26_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   340
#define F27    ((FloatRegister)(   F27_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   341
#define F28    ((FloatRegister)(   F28_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   342
#define F29    ((FloatRegister)(   F29_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   343
#define F30    ((FloatRegister)(   F30_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   344
#define F31    ((FloatRegister)(   F31_FloatRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   345
#endif // DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   346
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   347
// Use SpecialRegister as shortcut
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   348
class SpecialRegisterImpl;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   349
typedef SpecialRegisterImpl* SpecialRegister;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   350
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   351
inline SpecialRegister as_SpecialRegister(int encoding) {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   352
  return (SpecialRegister)(intptr_t)encoding;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   353
}
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   354
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   355
// The implementation of special registers for the Power architecture (LR, CTR and friends)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   356
class SpecialRegisterImpl: public AbstractRegisterImpl {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   357
 public:
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   358
  enum {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   359
    number_of_registers = 6
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   360
  };
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   361
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   362
  // construction
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   363
  inline friend SpecialRegister as_SpecialRegister(int encoding);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   364
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   365
  // accessors
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   366
  int             encoding()  const { assert(is_valid(), "invalid register"); return value(); }
25715
d5a8dbdc5150 8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
goetz
parents: 23221
diff changeset
   367
  inline VMReg    as_VMReg();
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   368
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   369
  // testers
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   370
  bool is_valid()       const { return 0 <= value() && value() < number_of_registers; }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   371
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   372
  const char* name() const;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   373
};
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   374
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   375
// The special registers of the PPC architecture
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   376
CONSTANT_REGISTER_DECLARATION(SpecialRegister, SR_XER,     (0));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   377
CONSTANT_REGISTER_DECLARATION(SpecialRegister, SR_LR,      (1));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   378
CONSTANT_REGISTER_DECLARATION(SpecialRegister, SR_CTR,     (2));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   379
CONSTANT_REGISTER_DECLARATION(SpecialRegister, SR_VRSAVE,  (3));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   380
CONSTANT_REGISTER_DECLARATION(SpecialRegister, SR_SPEFSCR, (4));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   381
CONSTANT_REGISTER_DECLARATION(SpecialRegister, SR_PPR,     (5));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   382
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   383
#ifndef DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   384
#define SR_XER     ((SpecialRegister)(SR_XER_SpecialRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   385
#define SR_LR      ((SpecialRegister)(SR_LR_SpecialRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   386
#define SR_CTR     ((SpecialRegister)(SR_CTR_SpecialRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   387
#define SR_VRSAVE  ((SpecialRegister)(SR_VRSAVE_SpecialRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   388
#define SR_SPEFSCR ((SpecialRegister)(SR_SPEFSCR_SpecialRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   389
#define SR_PPR     ((SpecialRegister)(SR_PPR_SpecialRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   390
#endif // DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   391
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   392
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   393
// Use VectorRegister as shortcut
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   394
class VectorRegisterImpl;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   395
typedef VectorRegisterImpl* VectorRegister;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   396
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   397
inline VectorRegister as_VectorRegister(int encoding) {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   398
  return (VectorRegister)(intptr_t)encoding;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   399
}
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   400
46809
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   401
// Forward declaration
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   402
// Use VectorSRegister as a shortcut.
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   403
class VectorSRegisterImpl;
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   404
typedef VectorSRegisterImpl* VectorSRegister;
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   405
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   406
// The implementation of vector registers for the Power architecture
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   407
class VectorRegisterImpl: public AbstractRegisterImpl {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   408
 public:
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   409
  enum {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   410
    number_of_registers = 32
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   411
  };
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   412
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   413
  // construction
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   414
  inline friend VectorRegister as_VectorRegister(int encoding);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   415
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   416
  // accessors
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   417
  int            encoding()  const { assert(is_valid(), "invalid register"); return value(); }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   418
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   419
  // testers
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   420
  bool is_valid()       const { return   0 <=  value()       &&  value() < number_of_registers; }
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   421
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   422
  const char* name() const;
46809
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   423
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   424
  // convert to VSR
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   425
  VectorSRegister to_vsr() const;
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   426
};
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   427
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   428
// The Vector registers of the Power architecture
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   429
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   430
CONSTANT_REGISTER_DECLARATION(VectorRegister, vnoreg, (-1));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   431
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   432
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR0,  ( 0));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   433
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR1,  ( 1));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   434
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR2,  ( 2));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   435
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR3,  ( 3));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   436
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR4,  ( 4));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   437
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR5,  ( 5));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   438
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR6,  ( 6));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   439
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR7,  ( 7));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   440
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR8,  ( 8));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   441
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR9,  ( 9));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   442
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR10, (10));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   443
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR11, (11));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   444
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR12, (12));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   445
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR13, (13));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   446
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR14, (14));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   447
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR15, (15));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   448
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR16, (16));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   449
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR17, (17));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   450
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR18, (18));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   451
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR19, (19));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   452
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR20, (20));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   453
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR21, (21));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   454
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR22, (22));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   455
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR23, (23));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   456
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR24, (24));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   457
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR25, (25));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   458
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR26, (26));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   459
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR27, (27));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   460
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR28, (28));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   461
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR29, (29));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   462
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR30, (30));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   463
CONSTANT_REGISTER_DECLARATION(VectorRegister, VR31, (31));
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   464
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   465
#ifndef DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   466
#define vnoreg ((VectorRegister)(vnoreg_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   467
#define VR0    ((VectorRegister)(   VR0_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   468
#define VR1    ((VectorRegister)(   VR1_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   469
#define VR2    ((VectorRegister)(   VR2_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   470
#define VR3    ((VectorRegister)(   VR3_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   471
#define VR4    ((VectorRegister)(   VR4_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   472
#define VR5    ((VectorRegister)(   VR5_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   473
#define VR6    ((VectorRegister)(   VR6_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   474
#define VR7    ((VectorRegister)(   VR7_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   475
#define VR8    ((VectorRegister)(   VR8_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   476
#define VR9    ((VectorRegister)(   VR9_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   477
#define VR10   ((VectorRegister)(  VR10_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   478
#define VR11   ((VectorRegister)(  VR11_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   479
#define VR12   ((VectorRegister)(  VR12_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   480
#define VR13   ((VectorRegister)(  VR13_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   481
#define VR14   ((VectorRegister)(  VR14_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   482
#define VR15   ((VectorRegister)(  VR15_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   483
#define VR16   ((VectorRegister)(  VR16_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   484
#define VR17   ((VectorRegister)(  VR17_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   485
#define VR18   ((VectorRegister)(  VR18_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   486
#define VR19   ((VectorRegister)(  VR19_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   487
#define VR20   ((VectorRegister)(  VR20_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   488
#define VR21   ((VectorRegister)(  VR21_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   489
#define VR22   ((VectorRegister)(  VR22_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   490
#define VR23   ((VectorRegister)(  VR23_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   491
#define VR24   ((VectorRegister)(  VR24_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   492
#define VR25   ((VectorRegister)(  VR25_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   493
#define VR26   ((VectorRegister)(  VR26_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   494
#define VR27   ((VectorRegister)(  VR27_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   495
#define VR28   ((VectorRegister)(  VR28_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   496
#define VR29   ((VectorRegister)(  VR29_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   497
#define VR30   ((VectorRegister)(  VR30_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   498
#define VR31   ((VectorRegister)(  VR31_VectorRegisterEnumValue))
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   499
#endif // DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   500
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   501
39236
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   502
inline VectorSRegister as_VectorSRegister(int encoding) {
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   503
  return (VectorSRegister)(intptr_t)encoding;
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   504
}
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   505
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   506
// The implementation of Vector-Scalar (VSX) registers on POWER architecture.
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   507
class VectorSRegisterImpl: public AbstractRegisterImpl {
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   508
 public:
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   509
  enum {
46809
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   510
    number_of_registers = 64
39236
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   511
  };
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   512
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   513
  // construction
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   514
  inline friend VectorSRegister as_VectorSRegister(int encoding);
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   515
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   516
  // accessors
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   517
  int encoding() const { assert(is_valid(), "invalid register"); return value(); }
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   518
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   519
  // testers
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   520
  bool is_valid() const { return 0 <=  value() &&  value() < number_of_registers; }
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   521
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   522
  const char* name() const;
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   523
};
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   524
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   525
// The Vector-Scalar (VSX) registers of the POWER architecture.
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   526
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   527
CONSTANT_REGISTER_DECLARATION(VectorSRegister, vsnoreg, (-1));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   528
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   529
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR0,  ( 0));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   530
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR1,  ( 1));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   531
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR2,  ( 2));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   532
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR3,  ( 3));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   533
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR4,  ( 4));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   534
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR5,  ( 5));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   535
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR6,  ( 6));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   536
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR7,  ( 7));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   537
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR8,  ( 8));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   538
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR9,  ( 9));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   539
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR10, (10));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   540
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR11, (11));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   541
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR12, (12));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   542
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR13, (13));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   543
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR14, (14));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   544
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR15, (15));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   545
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR16, (16));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   546
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR17, (17));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   547
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR18, (18));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   548
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR19, (19));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   549
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR20, (20));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   550
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR21, (21));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   551
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR22, (22));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   552
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR23, (23));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   553
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR24, (24));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   554
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR25, (25));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   555
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR26, (26));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   556
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR27, (27));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   557
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR28, (28));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   558
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR29, (29));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   559
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR30, (30));
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   560
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR31, (31));
46809
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   561
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR32, (32));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   562
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR33, (33));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   563
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR34, (34));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   564
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR35, (35));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   565
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR36, (36));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   566
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR37, (37));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   567
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR38, (38));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   568
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR39, (39));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   569
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR40, (40));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   570
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR41, (41));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   571
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR42, (42));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   572
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR43, (43));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   573
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR44, (44));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   574
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR45, (45));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   575
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR46, (46));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   576
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR47, (47));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   577
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR48, (48));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   578
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR49, (49));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   579
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR50, (50));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   580
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR51, (51));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   581
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR52, (52));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   582
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR53, (53));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   583
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR54, (54));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   584
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR55, (55));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   585
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR56, (56));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   586
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR57, (57));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   587
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR58, (58));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   588
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR59, (59));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   589
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR60, (60));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   590
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR61, (61));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   591
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR62, (62));
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   592
CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR63, (63));
39236
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   593
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   594
#ifndef DONT_USE_REGISTER_DEFINES
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   595
#define vsnoregi ((VectorSRegister)(vsnoreg_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   596
#define VSR0    ((VectorSRegister)(   VSR0_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   597
#define VSR1    ((VectorSRegister)(   VSR1_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   598
#define VSR2    ((VectorSRegister)(   VSR2_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   599
#define VSR3    ((VectorSRegister)(   VSR3_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   600
#define VSR4    ((VectorSRegister)(   VSR4_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   601
#define VSR5    ((VectorSRegister)(   VSR5_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   602
#define VSR6    ((VectorSRegister)(   VSR6_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   603
#define VSR7    ((VectorSRegister)(   VSR7_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   604
#define VSR8    ((VectorSRegister)(   VSR8_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   605
#define VSR9    ((VectorSRegister)(   VSR9_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   606
#define VSR10   ((VectorSRegister)(  VSR10_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   607
#define VSR11   ((VectorSRegister)(  VSR11_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   608
#define VSR12   ((VectorSRegister)(  VSR12_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   609
#define VSR13   ((VectorSRegister)(  VSR13_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   610
#define VSR14   ((VectorSRegister)(  VSR14_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   611
#define VSR15   ((VectorSRegister)(  VSR15_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   612
#define VSR16   ((VectorSRegister)(  VSR16_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   613
#define VSR17   ((VectorSRegister)(  VSR17_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   614
#define VSR18   ((VectorSRegister)(  VSR18_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   615
#define VSR19   ((VectorSRegister)(  VSR19_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   616
#define VSR20   ((VectorSRegister)(  VSR20_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   617
#define VSR21   ((VectorSRegister)(  VSR21_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   618
#define VSR22   ((VectorSRegister)(  VSR22_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   619
#define VSR23   ((VectorSRegister)(  VSR23_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   620
#define VSR24   ((VectorSRegister)(  VSR24_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   621
#define VSR25   ((VectorSRegister)(  VSR25_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   622
#define VSR26   ((VectorSRegister)(  VSR26_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   623
#define VSR27   ((VectorSRegister)(  VSR27_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   624
#define VSR28   ((VectorSRegister)(  VSR28_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   625
#define VSR29   ((VectorSRegister)(  VSR29_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   626
#define VSR30   ((VectorSRegister)(  VSR30_VectorSRegisterEnumValue))
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   627
#define VSR31   ((VectorSRegister)(  VSR31_VectorSRegisterEnumValue))
46809
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   628
#define VSR32   ((VectorSRegister)(  VSR32_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   629
#define VSR33   ((VectorSRegister)(  VSR33_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   630
#define VSR34   ((VectorSRegister)(  VSR34_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   631
#define VSR35   ((VectorSRegister)(  VSR35_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   632
#define VSR36   ((VectorSRegister)(  VSR36_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   633
#define VSR37   ((VectorSRegister)(  VSR37_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   634
#define VSR38   ((VectorSRegister)(  VSR38_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   635
#define VSR39   ((VectorSRegister)(  VSR39_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   636
#define VSR40   ((VectorSRegister)(  VSR40_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   637
#define VSR41   ((VectorSRegister)(  VSR41_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   638
#define VSR42   ((VectorSRegister)(  VSR42_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   639
#define VSR43   ((VectorSRegister)(  VSR43_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   640
#define VSR44   ((VectorSRegister)(  VSR44_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   641
#define VSR45   ((VectorSRegister)(  VSR45_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   642
#define VSR46   ((VectorSRegister)(  VSR46_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   643
#define VSR47   ((VectorSRegister)(  VSR47_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   644
#define VSR48   ((VectorSRegister)(  VSR48_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   645
#define VSR49   ((VectorSRegister)(  VSR49_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   646
#define VSR50   ((VectorSRegister)(  VSR50_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   647
#define VSR51   ((VectorSRegister)(  VSR51_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   648
#define VSR52   ((VectorSRegister)(  VSR52_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   649
#define VSR53   ((VectorSRegister)(  VSR53_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   650
#define VSR54   ((VectorSRegister)(  VSR54_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   651
#define VSR55   ((VectorSRegister)(  VSR55_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   652
#define VSR56   ((VectorSRegister)(  VSR56_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   653
#define VSR57   ((VectorSRegister)(  VSR57_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   654
#define VSR58   ((VectorSRegister)(  VSR58_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   655
#define VSR59   ((VectorSRegister)(  VSR59_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   656
#define VSR60   ((VectorSRegister)(  VSR60_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   657
#define VSR61   ((VectorSRegister)(  VSR61_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   658
#define VSR62   ((VectorSRegister)(  VSR62_VectorSRegisterEnumValue))
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   659
#define VSR63   ((VectorSRegister)(  VSR63_VectorSRegisterEnumValue))
39236
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   660
#endif // DONT_USE_REGISTER_DEFINES
c9d756fa846e 8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents: 35594
diff changeset
   661
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   662
// Maximum number of incoming arguments that can be passed in i registers.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   663
const int PPC_ARGS_IN_REGS_NUM = 8;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   664
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   665
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   666
// Need to know the total number of registers of all sorts for SharedInfo.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   667
// Define a class that exports it.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   668
class ConcreteRegisterImpl : public AbstractRegisterImpl {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   669
 public:
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   670
  enum {
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   671
    // This number must be large enough to cover REG_COUNT (defined by c2) registers.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   672
    // There is no requirement that any ordering here matches any ordering c2 gives
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   673
    // it's optoregs.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   674
    number_of_registers =
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   675
      ( RegisterImpl::number_of_registers +
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   676
        FloatRegisterImpl::number_of_registers )
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   677
      * 2                                          // register halves
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   678
      + ConditionRegisterImpl::number_of_registers // condition code registers
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   679
      + SpecialRegisterImpl::number_of_registers   // special registers
46809
057f21a10f5f 8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents: 40071
diff changeset
   680
      + VectorRegisterImpl::number_of_registers    // VSX registers
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   681
  };
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   682
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   683
  static const int max_gpr;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   684
  static const int max_fpr;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   685
  static const int max_cnd;
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   686
};
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   687
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   688
// Common register declarations used in assembler code.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   689
REGISTER_DECLARATION(Register,      R0_SCRATCH, R0);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   690
REGISTER_DECLARATION(Register,      R1_SP,      R1);  // non-volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   691
REGISTER_DECLARATION(Register,      R2_TOC,     R2);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   692
REGISTER_DECLARATION(Register,      R3_RET,     R3);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   693
REGISTER_DECLARATION(Register,      R3_ARG1,    R3);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   694
REGISTER_DECLARATION(Register,      R4_ARG2,    R4);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   695
REGISTER_DECLARATION(Register,      R5_ARG3,    R5);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   696
REGISTER_DECLARATION(Register,      R6_ARG4,    R6);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   697
REGISTER_DECLARATION(Register,      R7_ARG5,    R7);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   698
REGISTER_DECLARATION(Register,      R8_ARG6,    R8);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   699
REGISTER_DECLARATION(Register,      R9_ARG7,    R9);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   700
REGISTER_DECLARATION(Register,      R10_ARG8,   R10); // volatile
22861
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents: 22824
diff changeset
   701
REGISTER_DECLARATION(FloatRegister, F0_SCRATCH, F0);  // volatile
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   702
REGISTER_DECLARATION(FloatRegister, F1_RET,     F1);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   703
REGISTER_DECLARATION(FloatRegister, F1_ARG1,    F1);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   704
REGISTER_DECLARATION(FloatRegister, F2_ARG2,    F2);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   705
REGISTER_DECLARATION(FloatRegister, F3_ARG3,    F3);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   706
REGISTER_DECLARATION(FloatRegister, F4_ARG4,    F4);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   707
REGISTER_DECLARATION(FloatRegister, F5_ARG5,    F5);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   708
REGISTER_DECLARATION(FloatRegister, F6_ARG6,    F6);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   709
REGISTER_DECLARATION(FloatRegister, F7_ARG7,    F7);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   710
REGISTER_DECLARATION(FloatRegister, F8_ARG8,    F8);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   711
REGISTER_DECLARATION(FloatRegister, F9_ARG9,    F9);  // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   712
REGISTER_DECLARATION(FloatRegister, F10_ARG10,  F10); // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   713
REGISTER_DECLARATION(FloatRegister, F11_ARG11,  F11); // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   714
REGISTER_DECLARATION(FloatRegister, F12_ARG12,  F12); // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   715
REGISTER_DECLARATION(FloatRegister, F13_ARG13,  F13); // volatile
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   716
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   717
#ifndef DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   718
#define R0_SCRATCH         AS_REGISTER(Register, R0)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   719
#define R1_SP              AS_REGISTER(Register, R1)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   720
#define R2_TOC             AS_REGISTER(Register, R2)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   721
#define R3_RET             AS_REGISTER(Register, R3)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   722
#define R3_ARG1            AS_REGISTER(Register, R3)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   723
#define R4_ARG2            AS_REGISTER(Register, R4)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   724
#define R5_ARG3            AS_REGISTER(Register, R5)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   725
#define R6_ARG4            AS_REGISTER(Register, R6)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   726
#define R7_ARG5            AS_REGISTER(Register, R7)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   727
#define R8_ARG6            AS_REGISTER(Register, R8)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   728
#define R9_ARG7            AS_REGISTER(Register, R9)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   729
#define R10_ARG8           AS_REGISTER(Register, R10)
22861
f5c393d456fc 8029940: PPC64 (part 122): C2 compiler port
goetz
parents: 22824
diff changeset
   730
#define F0_SCRATCH         AS_REGISTER(FloatRegister, F0)
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   731
#define F1_RET             AS_REGISTER(FloatRegister, F1)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   732
#define F1_ARG1            AS_REGISTER(FloatRegister, F1)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   733
#define F2_ARG2            AS_REGISTER(FloatRegister, F2)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   734
#define F3_ARG3            AS_REGISTER(FloatRegister, F3)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   735
#define F4_ARG4            AS_REGISTER(FloatRegister, F4)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   736
#define F5_ARG5            AS_REGISTER(FloatRegister, F5)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   737
#define F6_ARG6            AS_REGISTER(FloatRegister, F6)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   738
#define F7_ARG7            AS_REGISTER(FloatRegister, F7)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   739
#define F8_ARG8            AS_REGISTER(FloatRegister, F8)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   740
#define F9_ARG9            AS_REGISTER(FloatRegister, F9)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   741
#define F10_ARG10          AS_REGISTER(FloatRegister, F10)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   742
#define F11_ARG11          AS_REGISTER(FloatRegister, F11)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   743
#define F12_ARG12          AS_REGISTER(FloatRegister, F12)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   744
#define F13_ARG13          AS_REGISTER(FloatRegister, F13)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   745
#endif
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   746
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   747
// Register declarations to be used in frame manager assembly code.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   748
// Use only non-volatile registers in order to keep values across C-calls.
23221
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   749
REGISTER_DECLARATION(Register, R14_bcp,        R14);
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   750
REGISTER_DECLARATION(Register, R15_esp,        R15);
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   751
REGISTER_DECLARATION(FloatRegister, F15_ftos,  F15);
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   752
REGISTER_DECLARATION(Register, R16_thread,     R16);      // address of current thread
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   753
REGISTER_DECLARATION(Register, R17_tos,        R17);      // address of Java tos (prepushed).
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   754
REGISTER_DECLARATION(Register, R18_locals,     R18);      // address of first param slot (receiver).
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   755
REGISTER_DECLARATION(Register, R19_method,     R19);      // address of current method
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   756
#ifndef DONT_USE_REGISTER_DEFINES
23221
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   757
#define R14_bcp           AS_REGISTER(Register, R14)
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   758
#define R15_esp           AS_REGISTER(Register, R15)
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   759
#define F15_ftos          AS_REGISTER(FloatRegister, F15)
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   760
#define R16_thread        AS_REGISTER(Register, R16)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   761
#define R17_tos           AS_REGISTER(Register, R17)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   762
#define R18_locals        AS_REGISTER(Register, R18)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   763
#define R19_method        AS_REGISTER(Register, R19)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   764
#define R21_sender_SP     AS_REGISTER(Register, R21)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   765
#define R23_method_handle AS_REGISTER(Register, R23)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   766
#endif
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   767
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   768
// Temporary registers to be used within frame manager. We can use
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   769
// the non-volatiles because the call stub has saved them.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   770
// Use only non-volatile registers in order to keep values across C-calls.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   771
REGISTER_DECLARATION(Register, R21_tmp1, R21);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   772
REGISTER_DECLARATION(Register, R22_tmp2, R22);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   773
REGISTER_DECLARATION(Register, R23_tmp3, R23);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   774
REGISTER_DECLARATION(Register, R24_tmp4, R24);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   775
REGISTER_DECLARATION(Register, R25_tmp5, R25);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   776
REGISTER_DECLARATION(Register, R26_tmp6, R26);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   777
REGISTER_DECLARATION(Register, R27_tmp7, R27);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   778
REGISTER_DECLARATION(Register, R28_tmp8, R28);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   779
REGISTER_DECLARATION(Register, R29_tmp9, R29);
23221
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   780
REGISTER_DECLARATION(Register, R24_dispatch_addr,     R24);
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   781
REGISTER_DECLARATION(Register, R25_templateTableBase, R25);
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   782
REGISTER_DECLARATION(Register, R26_monitor,           R26);
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   783
REGISTER_DECLARATION(Register, R27_constPoolCache,    R27);
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   784
REGISTER_DECLARATION(Register, R28_mdx,               R28);
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   785
35085
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents: 25715
diff changeset
   786
REGISTER_DECLARATION(Register, R19_inline_cache_reg, R19);
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents: 25715
diff changeset
   787
REGISTER_DECLARATION(Register, R29_TOC, R29);
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents: 25715
diff changeset
   788
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   789
#ifndef DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   790
#define R21_tmp1         AS_REGISTER(Register, R21)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   791
#define R22_tmp2         AS_REGISTER(Register, R22)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   792
#define R23_tmp3         AS_REGISTER(Register, R23)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   793
#define R24_tmp4         AS_REGISTER(Register, R24)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   794
#define R25_tmp5         AS_REGISTER(Register, R25)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   795
#define R26_tmp6         AS_REGISTER(Register, R26)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   796
#define R27_tmp7         AS_REGISTER(Register, R27)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   797
#define R28_tmp8         AS_REGISTER(Register, R28)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   798
#define R29_tmp9         AS_REGISTER(Register, R29)
23221
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   799
//    Lmonitors  : monitor pointer
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   800
//    LcpoolCache: constant pool cache
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   801
//    mdx: method data index
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   802
#define R24_dispatch_addr     AS_REGISTER(Register, R24)
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   803
#define R25_templateTableBase AS_REGISTER(Register, R25)
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   804
#define R26_monitor           AS_REGISTER(Register, R26)
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   805
#define R27_constPoolCache    AS_REGISTER(Register, R27)
b70675ece1ce 8036976: PPC64: implement the template interpreter
goetz
parents: 22861
diff changeset
   806
#define R28_mdx               AS_REGISTER(Register, R28)
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   807
35085
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents: 25715
diff changeset
   808
#define R19_inline_cache_reg AS_REGISTER(Register, R19)
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents: 25715
diff changeset
   809
#define R29_TOC AS_REGISTER(Register, R29)
22824
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   810
#endif
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   811
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   812
// Scratch registers are volatile.
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   813
REGISTER_DECLARATION(Register, R11_scratch1, R11);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   814
REGISTER_DECLARATION(Register, R12_scratch2, R12);
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   815
#ifndef DONT_USE_REGISTER_DEFINES
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   816
#define R11_scratch1   AS_REGISTER(Register, R11)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   817
#define R12_scratch2   AS_REGISTER(Register, R12)
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   818
#endif
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   819
28258dd5cb2e 8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff changeset
   820
#endif // CPU_PPC_VM_REGISTER_PPC_HPP