--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp Fri Sep 02 21:33:57 2011 -0700
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp Wed Sep 07 11:52:00 2011 -0700
@@ -75,6 +75,24 @@
FLAG_SET_DEFAULT(AllocatePrefetchStyle, 1);
}
+ if (has_v9()) {
+ assert(ArraycopySrcPrefetchDistance < 4096, "invalid value");
+ if (ArraycopySrcPrefetchDistance >= 4096)
+ ArraycopySrcPrefetchDistance = 4064;
+ assert(ArraycopyDstPrefetchDistance < 4096, "invalid value");
+ if (ArraycopyDstPrefetchDistance >= 4096)
+ ArraycopyDstPrefetchDistance = 4064;
+ } else {
+ if (ArraycopySrcPrefetchDistance > 0) {
+ warning("prefetch instructions are not available on this CPU");
+ FLAG_SET_DEFAULT(ArraycopySrcPrefetchDistance, 0);
+ }
+ if (ArraycopyDstPrefetchDistance > 0) {
+ warning("prefetch instructions are not available on this CPU");
+ FLAG_SET_DEFAULT(ArraycopyDstPrefetchDistance, 0);
+ }
+ }
+
UseSSE = 0; // Only on x86 and x64
_supports_cx8 = has_v9();
@@ -170,6 +188,26 @@
FLAG_SET_DEFAULT(UseCBCond, false);
}
+ assert(BlockZeroingLowLimit > 0, "invalid value");
+ if (has_block_zeroing()) {
+ if (FLAG_IS_DEFAULT(UseBlockZeroing)) {
+ FLAG_SET_DEFAULT(UseBlockZeroing, true);
+ }
+ } else if (UseBlockZeroing) {
+ warning("BIS zeroing instructions are not available on this CPU");
+ FLAG_SET_DEFAULT(UseBlockZeroing, false);
+ }
+
+ assert(BlockCopyLowLimit > 0, "invalid value");
+ if (has_block_zeroing()) { // has_blk_init() && is_T4(): core's local L2 cache
+ if (FLAG_IS_DEFAULT(UseBlockCopy)) {
+ FLAG_SET_DEFAULT(UseBlockCopy, true);
+ }
+ } else if (UseBlockCopy) {
+ warning("BIS instructions are not available or expensive on this CPU");
+ FLAG_SET_DEFAULT(UseBlockCopy, false);
+ }
+
#ifdef COMPILER2
// T4 and newer Sparc cpus have fast RDPC.
if (has_fast_rdpc() && FLAG_IS_DEFAULT(UseRDPCForConstantTableBase)) {