comparison src/cpu/sparc/vm/vm_version_sparc.cpp @ 13423:eae426d683f6

8029190: VM_Version::determine_features() asserts on Fujitsu Sparc64 CPUs Summary: fix code to allow testing on Fujitsu Sparc64 CPUs Reviewed-by: kvn
author simonis
date Mon, 02 Dec 2013 11:12:32 +0100
parents 46c544b8fbfc
children de6a9e811145
comparison
equal deleted inserted replaced
13422:55dd6e77b399 13423:eae426d683f6
87 UseSSE = 0; // Only on x86 and x64 87 UseSSE = 0; // Only on x86 and x64
88 88
89 _supports_cx8 = has_v9(); 89 _supports_cx8 = has_v9();
90 _supports_atomic_getset4 = true; // swap instruction 90 _supports_atomic_getset4 = true; // swap instruction
91 91
92 if (is_niagara()) { 92 // There are Fujitsu Sparc64 CPUs which support blk_init as well so
93 // Indirect branch is the same cost as direct 93 // we have to take this check out of the 'is_niagara()' block below.
94 if (FLAG_IS_DEFAULT(UseInlineCaches)) { 94 if (has_blk_init()) {
95 FLAG_SET_DEFAULT(UseInlineCaches, false);
96 }
97 // Align loops on a single instruction boundary.
98 if (FLAG_IS_DEFAULT(OptoLoopAlignment)) {
99 FLAG_SET_DEFAULT(OptoLoopAlignment, 4);
100 }
101 // When using CMS or G1, we cannot use memset() in BOT updates 95 // When using CMS or G1, we cannot use memset() in BOT updates
102 // because the sun4v/CMT version in libc_psr uses BIS which 96 // because the sun4v/CMT version in libc_psr uses BIS which
103 // exposes "phantom zeros" to concurrent readers. See 6948537. 97 // exposes "phantom zeros" to concurrent readers. See 6948537.
104 if (FLAG_IS_DEFAULT(UseMemSetInBOT) && (UseConcMarkSweepGC || UseG1GC)) { 98 if (FLAG_IS_DEFAULT(UseMemSetInBOT) && (UseConcMarkSweepGC || UseG1GC)) {
105 FLAG_SET_DEFAULT(UseMemSetInBOT, false); 99 FLAG_SET_DEFAULT(UseMemSetInBOT, false);
100 }
101 // Issue a stern warning if the user has explicitly set
102 // UseMemSetInBOT (it is known to cause issues), but allow
103 // use for experimentation and debugging.
104 if (UseConcMarkSweepGC || UseG1GC) {
105 if (UseMemSetInBOT) {
106 assert(!FLAG_IS_DEFAULT(UseMemSetInBOT), "Error");
107 warning("Experimental flag -XX:+UseMemSetInBOT is known to cause instability"
108 " on sun4v; please understand that you are using at your own risk!");
109 }
110 }
111 }
112
113 if (is_niagara()) {
114 // Indirect branch is the same cost as direct
115 if (FLAG_IS_DEFAULT(UseInlineCaches)) {
116 FLAG_SET_DEFAULT(UseInlineCaches, false);
117 }
118 // Align loops on a single instruction boundary.
119 if (FLAG_IS_DEFAULT(OptoLoopAlignment)) {
120 FLAG_SET_DEFAULT(OptoLoopAlignment, 4);
106 } 121 }
107 #ifdef _LP64 122 #ifdef _LP64
108 // 32-bit oops don't make sense for the 64-bit VM on sparc 123 // 32-bit oops don't make sense for the 64-bit VM on sparc
109 // since the 32-bit VM has the same registers and smaller objects. 124 // since the 32-bit VM has the same registers and smaller objects.
110 Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes); 125 Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes);