RFR (S) : 8014362 : Need to expose some processor features via Unsafe interface

John Rose john.r.rose at oracle.com
Thu May 16 16:05:39 PDT 2013


On May 16, 2013, at 3:57 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:

> X86_ONLY() is ugly. I would prefer to have something similar to VM_Version::has_fast_idiv(): VM_Version::has_clmul(). The drawback is you have to define it on all platforms. Which may be not bad if some of them have similar feature.

It is probably the least-bad ugly for this use case.  We are not likely to support this clmul-based algorithm other than on this one point-case.

> This is an other reason I don't like your approach of using x86 specific code in libraries. What if arm64 will have instructions to optimize crc?

By then we will have figured out a better way to manage these processor-sensitive algorithms.  If that better way is not VM_Version::has_clmul, then that would be wasted generalization.  More likely, I think, we will have a sun.misc.Processor API and a way to manage specialized code generation from JDK code.

Worst case is we add ARM64_ONLY(PUTPROP(...)), plus a bunch of ugly ARM assembly code, etc.  The PUTPROP is the least of our problems!

— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20130516/9f0efb91/attachment.html 


More information about the hotspot-compiler-dev mailing list