author | twisti |
Fri, 18 Dec 2015 12:39:02 -0800 | |
changeset 35135 | dd2ce9021031 |
parent 35110 | f19bcdf40799 |
parent 35063 | cb24277be2e7 |
child 35148 | 5cfafc99d791 |
permissions | -rw-r--r-- |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
1 |
/* |
30209
8ea30dc99369
8026049: (bf) Intrinsify ByteBuffer.put{Int, Double, Float, ...} methods
aph
parents:
28187
diff
changeset
|
2 |
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
8ea30dc99369
8026049: (bf) Intrinsify ByteBuffer.put{Int, Double, Float, ...} methods
aph
parents:
28187
diff
changeset
|
3 |
* Copyright 2012, 2015 SAP AG. 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" |
23211 | 27 |
#include "asm/assembler.inline.hpp" |
28 |
#include "asm/macroAssembler.inline.hpp" |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
29 |
#include "compiler/disassembler.hpp" |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
30 |
#include "memory/resourceArea.hpp" |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
31 |
#include "runtime/java.hpp" |
25949 | 32 |
#include "runtime/os.hpp" |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
33 |
#include "runtime/stubCodeGenerator.hpp" |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
34 |
#include "utilities/defaultStream.hpp" |
30303 | 35 |
#include "utilities/globalDefinitions.hpp" |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
36 |
#include "vm_version_ppc.hpp" |
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 |
# include <sys/sysinfo.h> |
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 |
int VM_Version::_features = VM_Version::unknown_m; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
41 |
const char* VM_Version::_features_str = ""; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
42 |
bool VM_Version::_is_determine_features_test_running = false; |
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 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
45 |
#define MSG(flag) \ |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
46 |
if (flag && !FLAG_IS_DEFAULT(flag)) \ |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
47 |
jio_fprintf(defaultStream::error_stream(), \ |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
48 |
"warning: -XX:+" #flag " requires -XX:+UseSIGTRAP\n" \ |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
49 |
" -XX:+" #flag " will be disabled!\n"); |
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 |
void VM_Version::initialize() { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
52 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
53 |
// Test which instructions are supported and measure cache line size. |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
54 |
determine_features(); |
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 |
// If PowerArchitecturePPC64 hasn't been specified explicitly determine from features. |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
57 |
if (FLAG_IS_DEFAULT(PowerArchitecturePPC64)) { |
35085 | 58 |
if (VM_Version::has_tcheck() && VM_Version::has_lqarx()) { |
30303 | 59 |
FLAG_SET_ERGO(uintx, PowerArchitecturePPC64, 8); |
60 |
} else if (VM_Version::has_popcntw()) { |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
61 |
FLAG_SET_ERGO(uintx, PowerArchitecturePPC64, 7); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
62 |
} else if (VM_Version::has_cmpb()) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
63 |
FLAG_SET_ERGO(uintx, PowerArchitecturePPC64, 6); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
64 |
} else if (VM_Version::has_popcntb()) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
65 |
FLAG_SET_ERGO(uintx, PowerArchitecturePPC64, 5); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
66 |
} else { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
67 |
FLAG_SET_ERGO(uintx, PowerArchitecturePPC64, 0); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
68 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
69 |
} |
35085 | 70 |
|
71 |
bool PowerArchitecturePPC64_ok = false; |
|
72 |
switch (PowerArchitecturePPC64) { |
|
73 |
case 8: if (!VM_Version::has_tcheck() ) break; |
|
74 |
if (!VM_Version::has_lqarx() ) break; |
|
75 |
case 7: if (!VM_Version::has_popcntw()) break; |
|
76 |
case 6: if (!VM_Version::has_cmpb() ) break; |
|
77 |
case 5: if (!VM_Version::has_popcntb()) break; |
|
78 |
case 0: PowerArchitecturePPC64_ok = true; break; |
|
79 |
default: break; |
|
80 |
} |
|
81 |
guarantee(PowerArchitecturePPC64_ok, "PowerArchitecturePPC64 cannot be set to " |
|
82 |
UINTX_FORMAT " on this machine", PowerArchitecturePPC64); |
|
30303 | 83 |
|
84 |
// Power 8: Configure Data Stream Control Register. |
|
85 |
if (PowerArchitecturePPC64 >= 8) { |
|
86 |
config_dscr(); |
|
87 |
} |
|
22824
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 |
if (!UseSIGTRAP) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
90 |
MSG(TrapBasedICMissChecks); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
91 |
MSG(TrapBasedNotEntrantChecks); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
92 |
MSG(TrapBasedNullChecks); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
93 |
FLAG_SET_ERGO(bool, TrapBasedNotEntrantChecks, false); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
94 |
FLAG_SET_ERGO(bool, TrapBasedNullChecks, false); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
95 |
FLAG_SET_ERGO(bool, TrapBasedICMissChecks, false); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
96 |
} |
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 |
#ifdef COMPILER2 |
22856
03ad2cf18166
8029015: PPC64 (part 216): opto: trap based null and range checks
goetz
parents:
22824
diff
changeset
|
99 |
if (!UseSIGTRAP) { |
03ad2cf18166
8029015: PPC64 (part 216): opto: trap based null and range checks
goetz
parents:
22824
diff
changeset
|
100 |
MSG(TrapBasedRangeChecks); |
03ad2cf18166
8029015: PPC64 (part 216): opto: trap based null and range checks
goetz
parents:
22824
diff
changeset
|
101 |
FLAG_SET_ERGO(bool, TrapBasedRangeChecks, false); |
03ad2cf18166
8029015: PPC64 (part 216): opto: trap based null and range checks
goetz
parents:
22824
diff
changeset
|
102 |
} |
03ad2cf18166
8029015: PPC64 (part 216): opto: trap based null and range checks
goetz
parents:
22824
diff
changeset
|
103 |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
104 |
// On Power6 test for section size. |
22861 | 105 |
if (PowerArchitecturePPC64 == 6) { |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
106 |
determine_section_size(); |
22861 | 107 |
// TODO: PPC port } else { |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
108 |
// TODO: PPC port PdScheduling::power6SectorSize = 0x20; |
22861 | 109 |
} |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
110 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
111 |
MaxVectorSize = 8; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
112 |
#endif |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
113 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
114 |
// Create and print feature-string. |
22861 | 115 |
char buf[(num_features+1) * 16]; // Max 16 chars per feature. |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
116 |
jio_snprintf(buf, sizeof(buf), |
30303 | 117 |
"ppc64%s%s%s%s%s%s%s%s%s%s%s%s", |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
118 |
(has_fsqrt() ? " fsqrt" : ""), |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
119 |
(has_isel() ? " isel" : ""), |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
120 |
(has_lxarxeh() ? " lxarxeh" : ""), |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
121 |
(has_cmpb() ? " cmpb" : ""), |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
122 |
//(has_mftgpr()? " mftgpr" : ""), |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
123 |
(has_popcntb() ? " popcntb" : ""), |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
124 |
(has_popcntw() ? " popcntw" : ""), |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
125 |
(has_fcfids() ? " fcfids" : ""), |
30303 | 126 |
(has_vand() ? " vand" : ""), |
127 |
(has_lqarx() ? " lqarx" : ""), |
|
128 |
(has_vcipher() ? " vcipher" : ""), |
|
129 |
(has_vpmsumb() ? " vpmsumb" : ""), |
|
130 |
(has_tcheck() ? " tcheck" : "") |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
131 |
// Make sure number of %s matches num_features! |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
132 |
); |
25949 | 133 |
_features_str = os::strdup(buf); |
30303 | 134 |
if (Verbose) { |
135 |
print_features(); |
|
136 |
} |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
137 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
138 |
// PPC64 supports 8-byte compare-exchange operations (see |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
139 |
// Atomic::cmpxchg and StubGenerator::generate_atomic_cmpxchg_ptr) |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
140 |
// and 'atomic long memory ops' (see Unsafe_GetLongVolatile). |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
141 |
_supports_cx8 = true; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
142 |
|
35085 | 143 |
// Used by C1. |
144 |
_supports_atomic_getset4 = true; |
|
145 |
_supports_atomic_getadd4 = true; |
|
146 |
_supports_atomic_getset8 = true; |
|
147 |
_supports_atomic_getadd8 = true; |
|
148 |
||
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
149 |
UseSSE = 0; // Only on x86 and x64 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
150 |
|
35085 | 151 |
intx cache_line_size = L1_data_cache_line_size(); |
22824
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 |
if (FLAG_IS_DEFAULT(AllocatePrefetchStyle)) AllocatePrefetchStyle = 1; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
154 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
155 |
if (AllocatePrefetchStyle == 4) { |
22861 | 156 |
AllocatePrefetchStepSize = cache_line_size; // Need exact value. |
157 |
if (FLAG_IS_DEFAULT(AllocatePrefetchLines)) AllocatePrefetchLines = 12; // Use larger blocks by default. |
|
158 |
if (AllocatePrefetchDistance < 0) AllocatePrefetchDistance = 2*cache_line_size; // Default is not defined? |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
159 |
} else { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
160 |
if (cache_line_size > AllocatePrefetchStepSize) AllocatePrefetchStepSize = cache_line_size; |
22861 | 161 |
if (FLAG_IS_DEFAULT(AllocatePrefetchLines)) AllocatePrefetchLines = 3; // Optimistic value. |
162 |
if (AllocatePrefetchDistance < 0) AllocatePrefetchDistance = 3*cache_line_size; // Default is not defined? |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
163 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
164 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
165 |
assert(AllocatePrefetchLines > 0, "invalid value"); |
28187
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
166 |
if (AllocatePrefetchLines < 1) { // Set valid value in product VM. |
22861 | 167 |
AllocatePrefetchLines = 1; // Conservative value. |
28187
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
168 |
} |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
169 |
|
28187
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
170 |
if (AllocatePrefetchStyle == 3 && AllocatePrefetchDistance < cache_line_size) { |
22861 | 171 |
AllocatePrefetchStyle = 1; // Fall back if inappropriate. |
28187
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
172 |
} |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
173 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
174 |
assert(AllocatePrefetchStyle >= 0, "AllocatePrefetchStyle should be positive"); |
28187
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
175 |
|
31861 | 176 |
// Implementation does not use any of the vector instructions |
177 |
// available with Power8. Their exploitation is still pending. |
|
178 |
if (!UseCRC32Intrinsics) { |
|
179 |
if (FLAG_IS_DEFAULT(UseCRC32Intrinsics)) { |
|
180 |
FLAG_SET_DEFAULT(UseCRC32Intrinsics, true); |
|
181 |
} |
|
182 |
} |
|
183 |
||
184 |
if (UseCRC32CIntrinsics) { |
|
185 |
if (!FLAG_IS_DEFAULT(UseCRC32CIntrinsics)) |
|
186 |
warning("CRC32C intrinsics are not available on this CPU"); |
|
187 |
FLAG_SET_DEFAULT(UseCRC32CIntrinsics, false); |
|
28187
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
188 |
} |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
189 |
|
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
190 |
// The AES intrinsic stubs require AES instruction support. |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
191 |
if (UseAES) { |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
192 |
warning("AES instructions are not available on this CPU"); |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
193 |
FLAG_SET_DEFAULT(UseAES, false); |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
194 |
} |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
195 |
if (UseAESIntrinsics) { |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
196 |
if (!FLAG_IS_DEFAULT(UseAESIntrinsics)) |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
197 |
warning("AES intrinsics are not available on this CPU"); |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
198 |
FLAG_SET_DEFAULT(UseAESIntrinsics, false); |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
199 |
} |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
200 |
|
31404
63e8fcd70bfc
8073108: Use x86 and SPARC CPU instructions for GHASH acceleration
ascarpino
parents:
30587
diff
changeset
|
201 |
if (UseGHASHIntrinsics) { |
63e8fcd70bfc
8073108: Use x86 and SPARC CPU instructions for GHASH acceleration
ascarpino
parents:
30587
diff
changeset
|
202 |
warning("GHASH intrinsics are not available on this CPU"); |
63e8fcd70bfc
8073108: Use x86 and SPARC CPU instructions for GHASH acceleration
ascarpino
parents:
30587
diff
changeset
|
203 |
FLAG_SET_DEFAULT(UseGHASHIntrinsics, false); |
63e8fcd70bfc
8073108: Use x86 and SPARC CPU instructions for GHASH acceleration
ascarpino
parents:
30587
diff
changeset
|
204 |
} |
63e8fcd70bfc
8073108: Use x86 and SPARC CPU instructions for GHASH acceleration
ascarpino
parents:
30587
diff
changeset
|
205 |
|
28187
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
206 |
if (UseSHA) { |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
207 |
warning("SHA instructions are not available on this CPU"); |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
208 |
FLAG_SET_DEFAULT(UseSHA, false); |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
209 |
} |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
210 |
if (UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics) { |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
211 |
warning("SHA intrinsics are not available on this CPU"); |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
212 |
FLAG_SET_DEFAULT(UseSHA1Intrinsics, false); |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
213 |
FLAG_SET_DEFAULT(UseSHA256Intrinsics, false); |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
214 |
FLAG_SET_DEFAULT(UseSHA512Intrinsics, false); |
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
215 |
} |
31515 | 216 |
|
32581 | 217 |
if (UseAdler32Intrinsics) { |
218 |
warning("Adler32Intrinsics not available on this CPU."); |
|
219 |
FLAG_SET_DEFAULT(UseAdler32Intrinsics, false); |
|
220 |
} |
|
221 |
||
31773 | 222 |
if (FLAG_IS_DEFAULT(UseMultiplyToLenIntrinsic)) { |
223 |
UseMultiplyToLenIntrinsic = true; |
|
224 |
} |
|
225 |
||
35110
f19bcdf40799
8143355: Update for addition of vectorizedMismatch intrinsic for x86
kvn
parents:
35085
diff
changeset
|
226 |
if (UseVectorizedMismatchIntrinsic) { |
f19bcdf40799
8143355: Update for addition of vectorizedMismatch intrinsic for x86
kvn
parents:
35085
diff
changeset
|
227 |
warning("UseVectorizedMismatchIntrinsic specified, but not available on this CPU."); |
f19bcdf40799
8143355: Update for addition of vectorizedMismatch intrinsic for x86
kvn
parents:
35085
diff
changeset
|
228 |
FLAG_SET_DEFAULT(UseVectorizedMismatchIntrinsic, false); |
f19bcdf40799
8143355: Update for addition of vectorizedMismatch intrinsic for x86
kvn
parents:
35085
diff
changeset
|
229 |
} |
f19bcdf40799
8143355: Update for addition of vectorizedMismatch intrinsic for x86
kvn
parents:
35085
diff
changeset
|
230 |
|
30303 | 231 |
// Adjust RTM (Restricted Transactional Memory) flags. |
35063
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
232 |
if (UseRTMLocking) { |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
233 |
// If CPU or OS are too old: |
30303 | 234 |
// Can't continue because UseRTMLocking affects UseBiasedLocking flag |
235 |
// setting during arguments processing. See use_biased_locking(). |
|
236 |
// VM_Version_init() is executed after UseBiasedLocking is used |
|
237 |
// in Thread::allocate(). |
|
35063
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
238 |
if (!has_tcheck()) { |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
239 |
vm_exit_during_initialization("RTM instructions are not available on this CPU"); |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
240 |
} |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
241 |
bool os_too_old = true; |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
242 |
#ifdef AIX |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
243 |
if (os::Aix::os_version() >= 0x0701031e) { // at least AIX 7.1.3.30 |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
244 |
os_too_old = false; |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
245 |
} |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
246 |
#endif |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
247 |
#ifdef linux |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
248 |
// TODO: check kernel version (we currently have too old versions only) |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
249 |
#endif |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
250 |
if (os_too_old) { |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
251 |
vm_exit_during_initialization("RTM is not supported on this OS version."); |
cb24277be2e7
8144847: PPC64: Update Transactional Memory and Atomic::cmpxchg code
mdoerr
parents:
32581
diff
changeset
|
252 |
} |
30303 | 253 |
} |
254 |
||
255 |
if (UseRTMLocking) { |
|
256 |
#if INCLUDE_RTM_OPT |
|
257 |
if (!UnlockExperimentalVMOptions) { |
|
258 |
vm_exit_during_initialization("UseRTMLocking is only available as experimental option on this platform. " |
|
259 |
"It must be enabled via -XX:+UnlockExperimentalVMOptions flag."); |
|
260 |
} else { |
|
261 |
warning("UseRTMLocking is only available as experimental option on this platform."); |
|
262 |
} |
|
263 |
if (!FLAG_IS_CMDLINE(UseRTMLocking)) { |
|
264 |
// RTM locking should be used only for applications with |
|
265 |
// high lock contention. For now we do not use it by default. |
|
266 |
vm_exit_during_initialization("UseRTMLocking flag should be only set on command line"); |
|
267 |
} |
|
268 |
if (!is_power_of_2(RTMTotalCountIncrRate)) { |
|
269 |
warning("RTMTotalCountIncrRate must be a power of 2, resetting it to 64"); |
|
270 |
FLAG_SET_DEFAULT(RTMTotalCountIncrRate, 64); |
|
271 |
} |
|
272 |
if (RTMAbortRatio < 0 || RTMAbortRatio > 100) { |
|
273 |
warning("RTMAbortRatio must be in the range 0 to 100, resetting it to 50"); |
|
274 |
FLAG_SET_DEFAULT(RTMAbortRatio, 50); |
|
275 |
} |
|
276 |
guarantee(RTMSpinLoopCount > 0, "unsupported"); |
|
277 |
#else |
|
278 |
// Only C2 does RTM locking optimization. |
|
279 |
// Can't continue because UseRTMLocking affects UseBiasedLocking flag |
|
280 |
// setting during arguments processing. See use_biased_locking(). |
|
281 |
vm_exit_during_initialization("RTM locking optimization is not supported in this VM"); |
|
282 |
#endif |
|
283 |
} else { // !UseRTMLocking |
|
284 |
if (UseRTMForStackLocks) { |
|
285 |
if (!FLAG_IS_DEFAULT(UseRTMForStackLocks)) { |
|
286 |
warning("UseRTMForStackLocks flag should be off when UseRTMLocking flag is off"); |
|
287 |
} |
|
288 |
FLAG_SET_DEFAULT(UseRTMForStackLocks, false); |
|
289 |
} |
|
290 |
if (UseRTMDeopt) { |
|
291 |
FLAG_SET_DEFAULT(UseRTMDeopt, false); |
|
292 |
} |
|
293 |
if (PrintPreciseRTMLockingStatistics) { |
|
294 |
FLAG_SET_DEFAULT(PrintPreciseRTMLockingStatistics, false); |
|
295 |
} |
|
296 |
} |
|
28187
fc19df82d6ee
8066964: ppc64: argument and return type profiling, fix problem with popframe
goetz
parents:
25949
diff
changeset
|
297 |
|
35085 | 298 |
// This machine allows unaligned memory accesses |
299 |
if (FLAG_IS_DEFAULT(UseUnalignedAccesses)) { |
|
300 |
FLAG_SET_DEFAULT(UseUnalignedAccesses, true); |
|
30209
8ea30dc99369
8026049: (bf) Intrinsify ByteBuffer.put{Int, Double, Float, ...} methods
aph
parents:
28187
diff
changeset
|
301 |
} |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
302 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
303 |
|
30303 | 304 |
bool VM_Version::use_biased_locking() { |
305 |
#if INCLUDE_RTM_OPT |
|
306 |
// RTM locking is most useful when there is high lock contention and |
|
307 |
// low data contention. With high lock contention the lock is usually |
|
308 |
// inflated and biased locking is not suitable for that case. |
|
309 |
// RTM locking code requires that biased locking is off. |
|
310 |
// Note: we can't switch off UseBiasedLocking in get_processor_features() |
|
311 |
// because it is used by Thread::allocate() which is called before |
|
312 |
// VM_Version::initialize(). |
|
313 |
if (UseRTMLocking && UseBiasedLocking) { |
|
314 |
if (FLAG_IS_DEFAULT(UseBiasedLocking)) { |
|
315 |
FLAG_SET_DEFAULT(UseBiasedLocking, false); |
|
316 |
} else { |
|
317 |
warning("Biased locking is not supported with RTM locking; ignoring UseBiasedLocking flag." ); |
|
318 |
UseBiasedLocking = false; |
|
319 |
} |
|
320 |
} |
|
321 |
#endif |
|
322 |
return UseBiasedLocking; |
|
323 |
} |
|
324 |
||
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
325 |
void VM_Version::print_features() { |
35085 | 326 |
tty->print_cr("Version: %s L1_data_cache_line_size=%d", cpu_features(), L1_data_cache_line_size()); |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
327 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
328 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
329 |
#ifdef COMPILER2 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
330 |
// Determine section size on power6: If section size is 8 instructions, |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
331 |
// there should be a difference between the two testloops of ~15 %. If |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
332 |
// no difference is detected the section is assumed to be 32 instructions. |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
333 |
void VM_Version::determine_section_size() { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
334 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
335 |
int unroll = 80; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
336 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
337 |
const int code_size = (2* unroll * 32 + 100)*BytesPerInstWord; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
338 |
|
22861 | 339 |
// Allocate space for the code. |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
340 |
ResourceMark rm; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
341 |
CodeBuffer cb("detect_section_size", code_size, 0); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
342 |
MacroAssembler* a = new MacroAssembler(&cb); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
343 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
344 |
uint32_t *code = (uint32_t *)a->pc(); |
22861 | 345 |
// Emit code. |
23211 | 346 |
void (*test1)() = (void(*)())(void *)a->function_entry(); |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
347 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
348 |
Label l1; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
349 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
350 |
a->li(R4, 1); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
351 |
a->sldi(R4, R4, 28); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
352 |
a->b(l1); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
353 |
a->align(CodeEntryAlignment); |
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 |
a->bind(l1); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
356 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
357 |
for (int i = 0; i < unroll; i++) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
358 |
// Schleife 1 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
359 |
// ------- sector 0 ------------ |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
360 |
// ;; 0 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
361 |
a->nop(); // 1 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
362 |
a->fpnop0(); // 2 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
363 |
a->fpnop1(); // 3 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
364 |
a->addi(R4,R4, -1); // 4 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
365 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
366 |
// ;; 1 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
367 |
a->nop(); // 5 |
22861 | 368 |
a->fmr(F6, F6); // 6 |
369 |
a->fmr(F7, F7); // 7 |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
370 |
a->endgroup(); // 8 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
371 |
// ------- sector 8 ------------ |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
372 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
373 |
// ;; 2 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
374 |
a->nop(); // 9 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
375 |
a->nop(); // 10 |
22861 | 376 |
a->fmr(F8, F8); // 11 |
377 |
a->fmr(F9, F9); // 12 |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
378 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
379 |
// ;; 3 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
380 |
a->nop(); // 13 |
22861 | 381 |
a->fmr(F10, F10); // 14 |
382 |
a->fmr(F11, F11); // 15 |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
383 |
a->endgroup(); // 16 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
384 |
// -------- sector 16 ------------- |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
385 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
386 |
// ;; 4 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
387 |
a->nop(); // 17 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
388 |
a->nop(); // 18 |
22861 | 389 |
a->fmr(F15, F15); // 19 |
390 |
a->fmr(F16, F16); // 20 |
|
22824
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 |
// ;; 5 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
393 |
a->nop(); // 21 |
22861 | 394 |
a->fmr(F17, F17); // 22 |
395 |
a->fmr(F18, F18); // 23 |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
396 |
a->endgroup(); // 24 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
397 |
// ------- sector 24 ------------ |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
398 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
399 |
// ;; 6 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
400 |
a->nop(); // 25 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
401 |
a->nop(); // 26 |
22861 | 402 |
a->fmr(F19, F19); // 27 |
403 |
a->fmr(F20, F20); // 28 |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
404 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
405 |
// ;; 7 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
406 |
a->nop(); // 29 |
22861 | 407 |
a->fmr(F21, F21); // 30 |
408 |
a->fmr(F22, F22); // 31 |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
409 |
a->brnop0(); // 32 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
410 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
411 |
// ------- sector 32 ------------ |
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 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
414 |
// ;; 8 |
22861 | 415 |
a->cmpdi(CCR0, R4, unroll); // 33 |
416 |
a->bge(CCR0, l1); // 34 |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
417 |
a->blr(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
418 |
|
22861 | 419 |
// Emit code. |
23211 | 420 |
void (*test2)() = (void(*)())(void *)a->function_entry(); |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
421 |
// uint32_t *code = (uint32_t *)a->pc(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
422 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
423 |
Label l2; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
424 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
425 |
a->li(R4, 1); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
426 |
a->sldi(R4, R4, 28); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
427 |
a->b(l2); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
428 |
a->align(CodeEntryAlignment); |
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 |
a->bind(l2); |
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 |
for (int i = 0; i < unroll; i++) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
433 |
// Schleife 2 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
434 |
// ------- sector 0 ------------ |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
435 |
// ;; 0 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
436 |
a->brnop0(); // 1 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
437 |
a->nop(); // 2 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
438 |
//a->cmpdi(CCR0, R4, unroll); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
439 |
a->fpnop0(); // 3 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
440 |
a->fpnop1(); // 4 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
441 |
a->addi(R4,R4, -1); // 5 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
442 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
443 |
// ;; 1 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
444 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
445 |
a->nop(); // 6 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
446 |
a->fmr(F6, F6); // 7 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
447 |
a->fmr(F7, F7); // 8 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
448 |
// ------- sector 8 --------------- |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
449 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
450 |
// ;; 2 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
451 |
a->endgroup(); // 9 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
452 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
453 |
// ;; 3 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
454 |
a->nop(); // 10 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
455 |
a->nop(); // 11 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
456 |
a->fmr(F8, F8); // 12 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
457 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
458 |
// ;; 4 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
459 |
a->fmr(F9, F9); // 13 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
460 |
a->nop(); // 14 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
461 |
a->fmr(F10, F10); // 15 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
462 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
463 |
// ;; 5 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
464 |
a->fmr(F11, F11); // 16 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
465 |
// -------- sector 16 ------------- |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
466 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
467 |
// ;; 6 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
468 |
a->endgroup(); // 17 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
469 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
470 |
// ;; 7 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
471 |
a->nop(); // 18 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
472 |
a->nop(); // 19 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
473 |
a->fmr(F15, F15); // 20 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
474 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
475 |
// ;; 8 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
476 |
a->fmr(F16, F16); // 21 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
477 |
a->nop(); // 22 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
478 |
a->fmr(F17, F17); // 23 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
479 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
480 |
// ;; 9 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
481 |
a->fmr(F18, F18); // 24 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
482 |
// -------- sector 24 ------------- |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
483 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
484 |
// ;; 10 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
485 |
a->endgroup(); // 25 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
486 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
487 |
// ;; 11 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
488 |
a->nop(); // 26 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
489 |
a->nop(); // 27 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
490 |
a->fmr(F19, F19); // 28 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
491 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
492 |
// ;; 12 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
493 |
a->fmr(F20, F20); // 29 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
494 |
a->nop(); // 30 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
495 |
a->fmr(F21, F21); // 31 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
496 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
497 |
// ;; 13 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
498 |
a->fmr(F22, F22); // 32 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
499 |
} |
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 |
// -------- sector 32 ------------- |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
502 |
// ;; 14 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
503 |
a->cmpdi(CCR0, R4, unroll); // 33 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
504 |
a->bge(CCR0, l2); // 34 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
505 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
506 |
a->blr(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
507 |
uint32_t *code_end = (uint32_t *)a->pc(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
508 |
a->flush(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
509 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
510 |
double loop1_seconds,loop2_seconds, rel_diff; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
511 |
uint64_t start1, stop1; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
512 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
513 |
start1 = os::current_thread_cpu_time(false); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
514 |
(*test1)(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
515 |
stop1 = os::current_thread_cpu_time(false); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
516 |
loop1_seconds = (stop1- start1) / (1000 *1000 *1000.0); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
517 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
518 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
519 |
start1 = os::current_thread_cpu_time(false); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
520 |
(*test2)(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
521 |
stop1 = os::current_thread_cpu_time(false); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
522 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
523 |
loop2_seconds = (stop1 - start1) / (1000 *1000 *1000.0); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
524 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
525 |
rel_diff = (loop2_seconds - loop1_seconds) / loop1_seconds *100; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
526 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
527 |
if (PrintAssembly) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
528 |
ttyLocker ttyl; |
25374
d7fb2af5d53c
8048169: Change 8037816 breaks HS build on PPC64 and CPP-Interpreter platforms
coleenp
parents:
24424
diff
changeset
|
529 |
tty->print_cr("Decoding section size detection stub at " INTPTR_FORMAT " before execution:", p2i(code)); |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
530 |
Disassembler::decode((u_char*)code, (u_char*)code_end, tty); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
531 |
tty->print_cr("Time loop1 :%f", loop1_seconds); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
532 |
tty->print_cr("Time loop2 :%f", loop2_seconds); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
533 |
tty->print_cr("(time2 - time1) / time1 = %f %%", rel_diff); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
534 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
535 |
if (rel_diff > 12.0) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
536 |
tty->print_cr("Section Size 8 Instructions"); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
537 |
} else{ |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
538 |
tty->print_cr("Section Size 32 Instructions or Power5"); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
539 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
540 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
541 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
542 |
#if 0 // TODO: PPC port |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
543 |
// Set sector size (if not set explicitly). |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
544 |
if (FLAG_IS_DEFAULT(Power6SectorSize128PPC64)) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
545 |
if (rel_diff > 12.0) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
546 |
PdScheduling::power6SectorSize = 0x20; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
547 |
} else { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
548 |
PdScheduling::power6SectorSize = 0x80; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
549 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
550 |
} else if (Power6SectorSize128PPC64) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
551 |
PdScheduling::power6SectorSize = 0x80; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
552 |
} else { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
553 |
PdScheduling::power6SectorSize = 0x20; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
554 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
555 |
#endif |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
556 |
if (UsePower6SchedulerPPC64) Unimplemented(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
557 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
558 |
#endif // COMPILER2 |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
559 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
560 |
void VM_Version::determine_features() { |
23211 | 561 |
#if defined(ABI_ELFv2) |
31333
12ccf8b26eb0
8080684: PPC64: Fix little-endian build after "8077838: Recent developments for ppc"
simonis
parents:
30587
diff
changeset
|
562 |
// 1 InstWord per call for the blr instruction. |
12ccf8b26eb0
8080684: PPC64: Fix little-endian build after "8077838: Recent developments for ppc"
simonis
parents:
30587
diff
changeset
|
563 |
const int code_size = (num_features+1+2*1)*BytesPerInstWord; |
23211 | 564 |
#else |
22861 | 565 |
// 7 InstWords for each call (function descriptor + blr instruction). |
566 |
const int code_size = (num_features+1+2*7)*BytesPerInstWord; |
|
23211 | 567 |
#endif |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
568 |
int features = 0; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
569 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
570 |
// create test area |
22861 | 571 |
enum { BUFFER_SIZE = 2*4*K }; // Needs to be >=2* max cache line size (cache line size can't exceed min page size). |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
572 |
char test_area[BUFFER_SIZE]; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
573 |
char *mid_of_test_area = &test_area[BUFFER_SIZE>>1]; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
574 |
|
22861 | 575 |
// Allocate space for the code. |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
576 |
ResourceMark rm; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
577 |
CodeBuffer cb("detect_cpu_features", code_size, 0); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
578 |
MacroAssembler* a = new MacroAssembler(&cb); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
579 |
|
23492 | 580 |
// Must be set to true so we can generate the test code. |
581 |
_features = VM_Version::all_features_m; |
|
582 |
||
22861 | 583 |
// Emit code. |
23211 | 584 |
void (*test)(address addr, uint64_t offset)=(void(*)(address addr, uint64_t offset))(void *)a->function_entry(); |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
585 |
uint32_t *code = (uint32_t *)a->pc(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
586 |
// Don't use R0 in ldarx. |
22861 | 587 |
// Keep R3_ARG1 unmodified, it contains &field (see below). |
588 |
// Keep R4_ARG2 unmodified, it contains offset = 0 (see below). |
|
30303 | 589 |
a->fsqrt(F3, F4); // code[0] -> fsqrt_m |
590 |
a->fsqrts(F3, F4); // code[1] -> fsqrts_m |
|
591 |
a->isel(R7, R5, R6, 0); // code[2] -> isel_m |
|
592 |
a->ldarx_unchecked(R7, R3_ARG1, R4_ARG2, 1); // code[3] -> lxarx_m |
|
593 |
a->cmpb(R7, R5, R6); // code[4] -> cmpb |
|
594 |
a->popcntb(R7, R5); // code[5] -> popcntb |
|
595 |
a->popcntw(R7, R5); // code[6] -> popcntw |
|
596 |
a->fcfids(F3, F4); // code[7] -> fcfids |
|
597 |
a->vand(VR0, VR0, VR0); // code[8] -> vand |
|
31333
12ccf8b26eb0
8080684: PPC64: Fix little-endian build after "8077838: Recent developments for ppc"
simonis
parents:
30587
diff
changeset
|
598 |
// arg0 of lqarx must be an even register, (arg1 + arg2) must be a multiple of 16 |
12ccf8b26eb0
8080684: PPC64: Fix little-endian build after "8077838: Recent developments for ppc"
simonis
parents:
30587
diff
changeset
|
599 |
a->lqarx_unchecked(R6, R3_ARG1, R4_ARG2, 1); // code[9] -> lqarx_m |
30303 | 600 |
a->vcipher(VR0, VR1, VR2); // code[10] -> vcipher |
601 |
a->vpmsumb(VR0, VR1, VR2); // code[11] -> vpmsumb |
|
602 |
a->tcheck(0); // code[12] -> tcheck |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
603 |
a->blr(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
604 |
|
22861 | 605 |
// Emit function to set one cache line to zero. Emit function descriptor and get pointer to it. |
23211 | 606 |
void (*zero_cacheline_func_ptr)(char*) = (void(*)(char*))(void *)a->function_entry(); |
22861 | 607 |
a->dcbz(R3_ARG1); // R3_ARG1 = addr |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
608 |
a->blr(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
609 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
610 |
uint32_t *code_end = (uint32_t *)a->pc(); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
611 |
a->flush(); |
23492 | 612 |
_features = VM_Version::unknown_m; |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
613 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
614 |
// Print the detection code. |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
615 |
if (PrintAssembly) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
616 |
ttyLocker ttyl; |
25374
d7fb2af5d53c
8048169: Change 8037816 breaks HS build on PPC64 and CPP-Interpreter platforms
coleenp
parents:
24424
diff
changeset
|
617 |
tty->print_cr("Decoding cpu-feature detection stub at " INTPTR_FORMAT " before execution:", p2i(code)); |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
618 |
Disassembler::decode((u_char*)code, (u_char*)code_end, tty); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
619 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
620 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
621 |
// Measure cache line size. |
22861 | 622 |
memset(test_area, 0xFF, BUFFER_SIZE); // Fill test area with 0xFF. |
623 |
(*zero_cacheline_func_ptr)(mid_of_test_area); // Call function which executes dcbz to the middle. |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
624 |
int count = 0; // count zeroed bytes |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
625 |
for (int i = 0; i < BUFFER_SIZE; i++) if (test_area[i] == 0) count++; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
626 |
guarantee(is_power_of_2(count), "cache line size needs to be a power of 2"); |
35085 | 627 |
_L1_data_cache_line_size = count; |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
628 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
629 |
// Execute code. Illegal instructions will be replaced by 0 in the signal handler. |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
630 |
VM_Version::_is_determine_features_test_running = true; |
31333
12ccf8b26eb0
8080684: PPC64: Fix little-endian build after "8077838: Recent developments for ppc"
simonis
parents:
30587
diff
changeset
|
631 |
// We must align the first argument to 16 bytes because of the lqarx check. |
12ccf8b26eb0
8080684: PPC64: Fix little-endian build after "8077838: Recent developments for ppc"
simonis
parents:
30587
diff
changeset
|
632 |
(*test)((address)align_size_up((intptr_t)mid_of_test_area, 16), (uint64_t)0); |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
633 |
VM_Version::_is_determine_features_test_running = false; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
634 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
635 |
// determine which instructions are legal. |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
636 |
int feature_cntr = 0; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
637 |
if (code[feature_cntr++]) features |= fsqrt_m; |
23492 | 638 |
if (code[feature_cntr++]) features |= fsqrts_m; |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
639 |
if (code[feature_cntr++]) features |= isel_m; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
640 |
if (code[feature_cntr++]) features |= lxarxeh_m; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
641 |
if (code[feature_cntr++]) features |= cmpb_m; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
642 |
if (code[feature_cntr++]) features |= popcntb_m; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
643 |
if (code[feature_cntr++]) features |= popcntw_m; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
644 |
if (code[feature_cntr++]) features |= fcfids_m; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
645 |
if (code[feature_cntr++]) features |= vand_m; |
30303 | 646 |
if (code[feature_cntr++]) features |= lqarx_m; |
647 |
if (code[feature_cntr++]) features |= vcipher_m; |
|
648 |
if (code[feature_cntr++]) features |= vpmsumb_m; |
|
649 |
if (code[feature_cntr++]) features |= tcheck_m; |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
650 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
651 |
// Print the detection code. |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
652 |
if (PrintAssembly) { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
653 |
ttyLocker ttyl; |
25374
d7fb2af5d53c
8048169: Change 8037816 breaks HS build on PPC64 and CPP-Interpreter platforms
coleenp
parents:
24424
diff
changeset
|
654 |
tty->print_cr("Decoding cpu-feature detection stub at " INTPTR_FORMAT " after execution:", p2i(code)); |
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
655 |
Disassembler::decode((u_char*)code, (u_char*)code_end, tty); |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
656 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
657 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
658 |
_features = features; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
659 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
660 |
|
30303 | 661 |
// Power 8: Configure Data Stream Control Register. |
662 |
void VM_Version::config_dscr() { |
|
663 |
assert(has_tcheck(), "Only execute on Power 8 or later!"); |
|
664 |
||
665 |
// 7 InstWords for each call (function descriptor + blr instruction). |
|
666 |
const int code_size = (2+2*7)*BytesPerInstWord; |
|
667 |
||
668 |
// Allocate space for the code. |
|
669 |
ResourceMark rm; |
|
670 |
CodeBuffer cb("config_dscr", code_size, 0); |
|
671 |
MacroAssembler* a = new MacroAssembler(&cb); |
|
672 |
||
673 |
// Emit code. |
|
31333
12ccf8b26eb0
8080684: PPC64: Fix little-endian build after "8077838: Recent developments for ppc"
simonis
parents:
30587
diff
changeset
|
674 |
uint64_t (*get_dscr)() = (uint64_t(*)())(void *)a->function_entry(); |
30303 | 675 |
uint32_t *code = (uint32_t *)a->pc(); |
676 |
a->mfdscr(R3); |
|
677 |
a->blr(); |
|
678 |
||
31333
12ccf8b26eb0
8080684: PPC64: Fix little-endian build after "8077838: Recent developments for ppc"
simonis
parents:
30587
diff
changeset
|
679 |
void (*set_dscr)(long) = (void(*)(long))(void *)a->function_entry(); |
30303 | 680 |
a->mtdscr(R3); |
681 |
a->blr(); |
|
682 |
||
683 |
uint32_t *code_end = (uint32_t *)a->pc(); |
|
684 |
a->flush(); |
|
685 |
||
686 |
// Print the detection code. |
|
687 |
if (PrintAssembly) { |
|
688 |
ttyLocker ttyl; |
|
30587
751a7698b62e
8079280: Fix format warning/error in vm_version_ppc.cpp
simonis
parents:
30303
diff
changeset
|
689 |
tty->print_cr("Decoding dscr configuration stub at " INTPTR_FORMAT " before execution:", p2i(code)); |
30303 | 690 |
Disassembler::decode((u_char*)code, (u_char*)code_end, tty); |
691 |
} |
|
692 |
||
693 |
// Apply the configuration if needed. |
|
694 |
uint64_t dscr_val = (*get_dscr)(); |
|
695 |
if (Verbose) { |
|
696 |
tty->print_cr("dscr value was 0x%lx" , dscr_val); |
|
697 |
} |
|
698 |
bool change_requested = false; |
|
699 |
if (DSCR_PPC64 != (uintx)-1) { |
|
700 |
dscr_val = DSCR_PPC64; |
|
701 |
change_requested = true; |
|
702 |
} |
|
703 |
if (DSCR_DPFD_PPC64 <= 7) { |
|
704 |
uint64_t mask = 0x7; |
|
705 |
if ((dscr_val & mask) != DSCR_DPFD_PPC64) { |
|
706 |
dscr_val = (dscr_val & ~mask) | (DSCR_DPFD_PPC64); |
|
707 |
change_requested = true; |
|
708 |
} |
|
709 |
} |
|
710 |
if (DSCR_URG_PPC64 <= 7) { |
|
711 |
uint64_t mask = 0x7 << 6; |
|
712 |
if ((dscr_val & mask) != DSCR_DPFD_PPC64 << 6) { |
|
713 |
dscr_val = (dscr_val & ~mask) | (DSCR_URG_PPC64 << 6); |
|
714 |
change_requested = true; |
|
715 |
} |
|
716 |
} |
|
717 |
if (change_requested) { |
|
718 |
(*set_dscr)(dscr_val); |
|
719 |
if (Verbose) { |
|
720 |
tty->print_cr("dscr was set to 0x%lx" , (*get_dscr)()); |
|
721 |
} |
|
722 |
} |
|
723 |
} |
|
22824
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
724 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
725 |
static int saved_features = 0; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
726 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
727 |
void VM_Version::allow_all() { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
728 |
saved_features = _features; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
729 |
_features = all_features_m; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
730 |
} |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
731 |
|
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
732 |
void VM_Version::revert() { |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
733 |
_features = saved_features; |
28258dd5cb2e
8019972: PPC64 (part 9): platform files for interpreter only VM.
goetz
parents:
diff
changeset
|
734 |
} |