Mercurial > hg > truffle
diff src/cpu/sparc/vm/sparc.ad @ 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 | 3e8fbc61cee8 |
children | 885e464e1a40 |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/sparc.ad Sat Oct 30 13:08:23 2010 -0700 +++ b/src/cpu/sparc/vm/sparc.ad Tue Nov 02 09:00:37 2010 -0700 @@ -1843,6 +1843,12 @@ return can_be_java_arg(reg); } +bool Matcher::use_asm_for_ldiv_by_con( jlong divisor ) { + // Use hardware SDIVX instruction when it is + // faster than a code which use multiply. + return VM_Version::has_fast_idiv(); +} + // Register for DIVI projection of divmodI RegMask Matcher::divI_proj_mask() { ShouldNotReachHere();