author | mhorie |
Mon, 17 Sep 2018 23:35:00 -0400 | |
changeset 51777 | 9c6d5e31618e |
parent 51711 | 3aafd7015d87 |
permissions | -rw-r--r-- |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
1 |
/* |
51710
355bd23b46e5
8210497: [PPC64] Vector registers not saved across safepoint
mdoerr
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. |
355bd23b46e5
8210497: [PPC64] Vector registers not saved across safepoint
mdoerr
parents:
47216
diff
changeset
|
3 |
* Copyright (c) 2012, 2018 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 |
#include "precompiled.hpp" |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
27 |
#include "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 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
30 |
const char* RegisterImpl::name() const { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
31 |
const char* names[number_of_registers] = { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
32 |
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
33 |
"R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15", |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
34 |
"R16", "R17", "R18", "R19", "R20", "R21", "R22", "R23", |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
35 |
"R24", "R25", "R26", "R27", "R28", "R29", "R30", "R31" |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
36 |
}; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
37 |
return is_valid() ? names[encoding()] : "noreg"; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
38 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
39 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
40 |
const char* ConditionRegisterImpl::name() const { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
41 |
const char* names[number_of_registers] = { |
22861 | 42 |
"CR0", "CR1", "CR2", "CR3", "CR4", "CR5", "CR6", "CR7" |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
43 |
}; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
44 |
return is_valid() ? names[encoding()] : "cnoreg"; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
45 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
46 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
47 |
const char* FloatRegisterImpl::name() const { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
48 |
const char* names[number_of_registers] = { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
49 |
"F0", "F1", "F2", "F3", "F4", "F5", "F6", "F7", |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
50 |
"F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
51 |
"F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
52 |
"F24", "F25", "F26", "F27", "F28", "F29", "F30", "F31" |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
53 |
}; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
54 |
return is_valid() ? names[encoding()] : "fnoreg"; |
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 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
57 |
const char* SpecialRegisterImpl::name() const { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
58 |
const char* names[number_of_registers] = { |
22861 | 59 |
"SR_XER", "SR_LR", "SR_CTR", "SR_VRSAVE", "SR_SPEFSCR", "SR_PPR" |
22824
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 |
return is_valid() ? names[encoding()] : "snoreg"; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
62 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
63 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
64 |
const char* VectorRegisterImpl::name() const { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
65 |
const char* names[number_of_registers] = { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
66 |
"VR0", "VR1", "VR2", "VR3", "VR4", "VR5", "VR6", "VR7", |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
67 |
"VR8", "VR9", "VR10", "VR11", "VR12", "VR13", "VR14", "VR15", |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
68 |
"VR16", "VR17", "VR18", "VR19", "VR20", "VR21", "VR22", "VR23", |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
69 |
"VR24", "VR25", "VR26", "VR27", "VR28", "VR29", "VR30", "VR31" |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
70 |
}; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
71 |
return is_valid() ? names[encoding()] : "vnoreg"; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
72 |
} |
39236
c9d756fa846e
8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents:
35594
diff
changeset
|
73 |
|
c9d756fa846e
8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents:
35594
diff
changeset
|
74 |
const char* VectorSRegisterImpl::name() const { |
c9d756fa846e
8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents:
35594
diff
changeset
|
75 |
const char* names[number_of_registers] = { |
c9d756fa846e
8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents:
35594
diff
changeset
|
76 |
"VSR0", "VSR1", "VSR2", "VSR3", "VSR4", "VSR5", "VSR6", "VSR7", |
c9d756fa846e
8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents:
35594
diff
changeset
|
77 |
"VSR8", "VSR9", "VSR10", "VSR11", "VSR12", "VSR13", "VSR14", "VSR15", |
c9d756fa846e
8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents:
35594
diff
changeset
|
78 |
"VSR16", "VSR17", "VSR18", "VSR19", "VSR20", "VSR21", "VSR22", "VSR23", |
46809
057f21a10f5f
8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents:
39236
diff
changeset
|
79 |
"VSR24", "VSR25", "VSR26", "VSR27", "VSR28", "VSR29", "VSR30", "VSR31", |
057f21a10f5f
8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents:
39236
diff
changeset
|
80 |
"VSR32", "VSR33", "VSR34", "VSR35", "VSR36", "VSR37", "VSR38", "VSR39", |
057f21a10f5f
8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents:
39236
diff
changeset
|
81 |
"VSR40", "VSR41", "VSR42", "VSR43", "VSR44", "VSR45", "VSR46", "VSR47", |
057f21a10f5f
8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents:
39236
diff
changeset
|
82 |
"VSR48", "VSR49", "VSR50", "VSR51", "VSR52", "VSR53", "VSR54", "VSR55", |
057f21a10f5f
8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents:
39236
diff
changeset
|
83 |
"VSR56", "VSR57", "VSR58", "VSR59", "VSR60", "VSR61", "VSR62", "VSR63" |
39236
c9d756fa846e
8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents:
35594
diff
changeset
|
84 |
}; |
c9d756fa846e
8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents:
35594
diff
changeset
|
85 |
return is_valid() ? names[encoding()] : "vsnoreg"; |
c9d756fa846e
8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents:
35594
diff
changeset
|
86 |
} |
c9d756fa846e
8154156: PPC64: improve array copy stubs by using vector instructions
mdoerr
parents:
35594
diff
changeset
|
87 |
|
51777
9c6d5e31618e
8210660: PPC64: Mapping floating point registers to vsx registers in ppc.ad
mhorie
parents:
51711
diff
changeset
|
88 |
// Method to convert a FloatRegister to a Vector-Scalar Register (VectorSRegister) |
9c6d5e31618e
8210660: PPC64: Mapping floating point registers to vsx registers in ppc.ad
mhorie
parents:
51711
diff
changeset
|
89 |
VectorSRegister FloatRegisterImpl::to_vsr() const { |
9c6d5e31618e
8210660: PPC64: Mapping floating point registers to vsx registers in ppc.ad
mhorie
parents:
51711
diff
changeset
|
90 |
if (this == fnoreg) { return vsnoreg; } |
9c6d5e31618e
8210660: PPC64: Mapping floating point registers to vsx registers in ppc.ad
mhorie
parents:
51711
diff
changeset
|
91 |
return as_VectorSRegister(encoding()); |
9c6d5e31618e
8210660: PPC64: Mapping floating point registers to vsx registers in ppc.ad
mhorie
parents:
51711
diff
changeset
|
92 |
} |
9c6d5e31618e
8210660: PPC64: Mapping floating point registers to vsx registers in ppc.ad
mhorie
parents:
51711
diff
changeset
|
93 |
|
46809
057f21a10f5f
8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents:
39236
diff
changeset
|
94 |
// Method to convert a VectorRegister to a Vector-Scalar Register (VectorSRegister) |
057f21a10f5f
8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents:
39236
diff
changeset
|
95 |
VectorSRegister VectorRegisterImpl::to_vsr() const { |
51711 | 96 |
if (this == vnoreg) { return vsnoreg; } |
46809
057f21a10f5f
8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents:
39236
diff
changeset
|
97 |
return as_VectorSRegister(encoding() + 32); |
057f21a10f5f
8185969: PPC64: Improve VSR support to use up to 64 registers
mdoerr
parents:
39236
diff
changeset
|
98 |
} |
51711 | 99 |
|
100 |
// Method to convert a VectorSRegister to a Vector Register (VectorRegister) |
|
101 |
VectorRegister VectorSRegisterImpl::to_vr() const { |
|
102 |
if (this == vsnoreg) { return vnoreg; } |
|
103 |
return as_VectorRegister(encoding() - 32); |
|
104 |
} |