Tue, 19 Apr 2011 09:30:17 -0700
7037812: few more defaults changes for new AMD processors
Summary: use PREFETCHW as default prefetch instruction, set UseXMMForArrayCopy and UseUnalignedLoadStores to true by default.
Reviewed-by: kvn
Contributed-by: tom.deneau@amd.com
src/cpu/x86/vm/vm_version_x86.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/cpu/x86/vm/vm_version_x86.cpp Mon Apr 18 06:50:57 2011 -0700 1.2 +++ b/src/cpu/x86/vm/vm_version_x86.cpp Tue Apr 19 09:30:17 2011 -0700 1.3 @@ -441,12 +441,25 @@ 1.4 } 1.5 } 1.6 1.7 - // On family 21 processors default is no sw prefetch 1.8 - if ( cpu_family() == 21 ) { 1.9 + // some defaults for AMD family 15h 1.10 + if ( cpu_family() == 0x15 ) { 1.11 + // On family 15h processors default is no sw prefetch 1.12 if (FLAG_IS_DEFAULT(AllocatePrefetchStyle)) { 1.13 AllocatePrefetchStyle = 0; 1.14 } 1.15 + // Also, if some other prefetch style is specified, default instruction type is PREFETCHW 1.16 + if (FLAG_IS_DEFAULT(AllocatePrefetchInstr)) { 1.17 + AllocatePrefetchInstr = 3; 1.18 + } 1.19 + // On family 15h processors use XMM and UnalignedLoadStores for Array Copy 1.20 + if( FLAG_IS_DEFAULT(UseXMMForArrayCopy) ) { 1.21 + UseXMMForArrayCopy = true; 1.22 + } 1.23 + if( FLAG_IS_DEFAULT(UseUnalignedLoadStores) && UseXMMForArrayCopy ) { 1.24 + UseUnalignedLoadStores = true; 1.25 + } 1.26 } 1.27 + 1.28 } 1.29 1.30 if( is_intel() ) { // Intel cpus specific settings