RFR: 8046943: RSA Acceleration

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Jun 18 19:28:08 UTC 2015


We have few new rules regarding intrinsics.
You need to add private static java method which does range checks 
because their are not executed in intrinsic code - see squareToLen() 
implementation, for example. Note, we will rewrite multiplyToLen() too soon.
Also method which will be intrinsified should be private static too and 
you can move allocation from it (like we did for squareToLen()) to avoid 
allocation in intrinsic code.

Your Hotspot changes are hard to accept. We have to compile for solaris 
with Sun compilers which does not work with such changes:

"hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp", line 3525: Warning: 
parameter in inline asm statement unused: %3.
"hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp", line 3525: Warning: 
parameter in inline asm statement unused: %6.
"hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp", line 3701: Error: The 
function "__builtin_expect" must have a prototype.
"hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp", line 3707: Error: The 
function "__builtin_alloca" must have a prototype.

May be you can convert the code to stub and add new MacroAssembler 
functions which you can use in sharedRuntime_x86_64.cpp. Yes, it is a 
lot of handwriting but we need it to work on all OSs.

Also on Solaris you can add asm code similar what we do in 
solaris_x86_64.il. It may allow you to rewrite to assembler stub.

Or don't do this intrinsic on Solaris (only linux and Mac).


On 6/18/15 10:20 AM, Anthony Scarpino wrote:
> On 06/18/2015 10:07 AM, Andrew Haley wrote:
>> On 06/18/2015 06:00 PM, Anthony Scarpino wrote:
>>> Question, on the hotspot side you said in a previous post this was
>>> C2-only.  Was there a reason you don't have it for all?
>> None.  It's up for negotiation.  What do you want?  C1, interp?
>> Andrew.
> I'd defer to the hotspot guys on what's best.  I'm just not aware of any
> purposeful limitations of AES, SHA, and GHASH intrinsics, none of these
> are in the c2_globals.hpp file, so I'm assuming that's what controlling
> the c2-only.
> Tony

More information about the hotspot-compiler-dev mailing list