Mercurial > hg > graal-jvmci-8
diff src/cpu/x86/vm/vm_version_x86.hpp @ 1914:ae065c367d93
6987135: Performance regression on Intel platform with 32-bits edition between 6u13 and 6u14.
Summary: Use hardware DIV instruction for long division by constant when it is faster than code with multiply.
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 02 Nov 2010 09:00:37 -0700 |
parents | a83b0246bb77 |
children | f95d63e2154a |
line wrap: on
line diff
--- a/src/cpu/x86/vm/vm_version_x86.hpp Sat Oct 30 13:08:23 2010 -0700 +++ b/src/cpu/x86/vm/vm_version_x86.hpp Tue Nov 02 09:00:37 2010 -0700 @@ -446,6 +446,10 @@ static bool supports_lzcnt() { return (_cpuFeatures & CPU_LZCNT) != 0; } static bool supports_sse4a() { return (_cpuFeatures & CPU_SSE4A) != 0; } + // Intel Core and newer cpus have fast IDIV instruction (excluding Atom). + static bool has_fast_idiv() { return is_intel() && cpu_family() == 6 && + supports_sse3() && _model != 0x1C; } + static bool supports_compare_and_exchange() { return true; } static const char* cpu_features() { return _features_str; }