hotspot/src/cpu/ppc/vm/c1_FrameMap_ppc.hpp
author twisti
Fri, 18 Dec 2015 12:39:02 -0800
changeset 35135 dd2ce9021031
parent 35085 839c8ba29724
child 35594 cc13089c6327
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35085
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
     1
/*
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
     2
 * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
     3
 * Copyright 2012, 2015 SAP AG. All rights reserved.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
     5
 *
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
     8
 * published by the Free Software Foundation.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
     9
 *
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    14
 * accompanied this code).
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    15
 *
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    19
 *
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    22
 * questions.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    23
 *
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    24
 */
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    25
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    26
#ifndef CPU_PPC_VM_C1_FRAMEMAP_PPC_HPP
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    27
#define CPU_PPC_VM_C1_FRAMEMAP_PPC_HPP
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    28
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    29
 public:
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    30
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    31
  enum {
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    32
    nof_reg_args = 8,   // Registers R3-R10 are available for parameter passing.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    33
    first_available_sp_in_frame = frame::jit_out_preserve_size,
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    34
    frame_pad_in_bytes = 0
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    35
  };
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    36
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    37
  static const int pd_c_runtime_reserved_arg_size;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    38
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    39
  static LIR_Opr  R0_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    40
  static LIR_Opr  R1_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    41
  static LIR_Opr  R2_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    42
  static LIR_Opr  R3_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    43
  static LIR_Opr  R4_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    44
  static LIR_Opr  R5_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    45
  static LIR_Opr  R6_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    46
  static LIR_Opr  R7_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    47
  static LIR_Opr  R8_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    48
  static LIR_Opr  R9_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    49
  static LIR_Opr R10_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    50
  static LIR_Opr R11_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    51
  static LIR_Opr R12_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    52
  static LIR_Opr R13_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    53
  static LIR_Opr R14_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    54
  static LIR_Opr R15_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    55
  static LIR_Opr R16_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    56
  static LIR_Opr R17_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    57
  static LIR_Opr R18_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    58
  static LIR_Opr R19_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    59
  static LIR_Opr R20_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    60
  static LIR_Opr R21_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    61
  static LIR_Opr R22_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    62
  static LIR_Opr R23_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    63
  static LIR_Opr R24_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    64
  static LIR_Opr R25_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    65
  static LIR_Opr R26_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    66
  static LIR_Opr R27_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    67
  static LIR_Opr R28_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    68
  static LIR_Opr R29_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    69
  static LIR_Opr R30_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    70
  static LIR_Opr R31_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    71
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    72
  static LIR_Opr  R0_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    73
  //R1: Stack pointer. Not an oop.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    74
  static LIR_Opr  R2_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    75
  static LIR_Opr  R3_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    76
  static LIR_Opr  R4_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    77
  static LIR_Opr  R5_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    78
  static LIR_Opr  R6_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    79
  static LIR_Opr  R7_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    80
  static LIR_Opr  R8_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    81
  static LIR_Opr  R9_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    82
  static LIR_Opr R10_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    83
  static LIR_Opr R11_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    84
  static LIR_Opr R12_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    85
  //R13: System thread register. Not usable.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    86
  static LIR_Opr R14_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    87
  static LIR_Opr R15_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    88
  //R16: Java thread register. Not an oop.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    89
  static LIR_Opr R17_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    90
  static LIR_Opr R18_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    91
  static LIR_Opr R19_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    92
  static LIR_Opr R20_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    93
  static LIR_Opr R21_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    94
  static LIR_Opr R22_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    95
  static LIR_Opr R23_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    96
  static LIR_Opr R24_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    97
  static LIR_Opr R25_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    98
  static LIR_Opr R26_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
    99
  static LIR_Opr R27_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   100
  static LIR_Opr R28_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   101
  static LIR_Opr R29_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   102
  //R29: TOC register. Not an oop.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   103
  static LIR_Opr R30_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   104
  static LIR_Opr R31_oop_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   105
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   106
  static LIR_Opr  R0_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   107
  //R1: Stack pointer. Not metadata.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   108
  static LIR_Opr  R2_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   109
  static LIR_Opr  R3_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   110
  static LIR_Opr  R4_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   111
  static LIR_Opr  R5_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   112
  static LIR_Opr  R6_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   113
  static LIR_Opr  R7_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   114
  static LIR_Opr  R8_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   115
  static LIR_Opr  R9_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   116
  static LIR_Opr R10_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   117
  static LIR_Opr R11_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   118
  static LIR_Opr R12_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   119
  //R13: System thread register. Not usable.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   120
  static LIR_Opr R14_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   121
  static LIR_Opr R15_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   122
  //R16: Java thread register. Not metadata.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   123
  static LIR_Opr R17_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   124
  static LIR_Opr R18_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   125
  static LIR_Opr R19_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   126
  static LIR_Opr R20_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   127
  static LIR_Opr R21_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   128
  static LIR_Opr R22_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   129
  static LIR_Opr R23_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   130
  static LIR_Opr R24_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   131
  static LIR_Opr R25_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   132
  static LIR_Opr R26_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   133
  static LIR_Opr R27_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   134
  static LIR_Opr R28_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   135
  //R29: TOC register. Not metadata.
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   136
  static LIR_Opr R30_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   137
  static LIR_Opr R31_metadata_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   138
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   139
  static LIR_Opr SP_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   140
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   141
  static LIR_Opr R0_long_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   142
  static LIR_Opr R3_long_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   143
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   144
  static LIR_Opr F1_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   145
  static LIR_Opr F1_double_opr;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   146
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   147
 private:
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   148
  static FloatRegister  _fpu_regs [nof_fpu_regs];
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   149
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   150
  static LIR_Opr as_long_single_opr(Register r) {
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   151
    return LIR_OprFact::double_cpu(cpu_reg2rnr(r), cpu_reg2rnr(r));
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   152
  }
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   153
  static LIR_Opr as_long_pair_opr(Register r) {
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   154
    return LIR_OprFact::double_cpu(cpu_reg2rnr(r->successor()), cpu_reg2rnr(r));
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   155
  }
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   156
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   157
 public:
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   158
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   159
#ifdef _LP64
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   160
  static LIR_Opr as_long_opr(Register r) {
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   161
    return as_long_single_opr(r);
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   162
  }
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   163
  static LIR_Opr as_pointer_opr(Register r) {
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   164
    return as_long_single_opr(r);
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   165
  }
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   166
#else
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   167
  static LIR_Opr as_long_opr(Register r) {
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   168
    Unimplemented(); return 0;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   169
//    return as_long_pair_opr(r);
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   170
  }
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   171
  static LIR_Opr as_pointer_opr(Register r) {
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   172
    Unimplemented(); return 0;
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   173
//    return as_opr(r);
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   174
  }
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   175
#endif
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   176
  static LIR_Opr as_float_opr(FloatRegister r) {
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   177
    return LIR_OprFact::single_fpu(r->encoding());
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   178
  }
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   179
  static LIR_Opr as_double_opr(FloatRegister r) {
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   180
    return LIR_OprFact::double_fpu(r->encoding());
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   181
  }
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   182
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   183
  static FloatRegister nr2floatreg (int rnr);
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   184
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   185
  static VMReg fpu_regname (int n);
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   186
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   187
  static bool is_caller_save_register(LIR_Opr  reg);
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   188
  static bool is_caller_save_register(Register r);
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   189
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   190
  static int nof_caller_save_cpu_regs() { return pd_nof_caller_save_cpu_regs_frame_map; }
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   191
  static int last_cpu_reg()             { return pd_last_cpu_reg; }
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   192
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   193
  // Registers which need to be saved in the frames (e.g. for GC).
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   194
  // Register usage:
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   195
  //  R0: scratch
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   196
  //  R1: sp
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   197
  // R13: system thread id
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   198
  // R16: java thread
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   199
  // R29: global TOC
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   200
  static bool reg_needs_save(Register r) { return r != R0 && r != R1 && r != R13 && r != R16 && r != R29; }
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   201
839c8ba29724 8144019: PPC64 C1: Introduce Client Compiler
mdoerr
parents:
diff changeset
   202
#endif // CPU_PPC_VM_C1_FRAMEMAP_PPC_HPP