United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4850194 : (C1) Intrinsics for operations used in crypto

Details
Type:
Enhancement
Submit Date:
2003-04-17
Status:
Closed
Updated Date:
2017-02-17
Project Name:
JDK
Resolved Date:
2017-02-17
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P4
Resolution:
Won't Fix
Affected Versions:
5.0,9,10
Fixed Versions:

Related Reports
Relates:
Relates:

Sub Tasks

Description
It should be possible to get a noticeable improvement in the performance of some of the crypto code by adding a few intrinsics:

 (1) unsigned integer to long conversion. (i & 0xffffffffL) to zero-extend integers to longs.

 (2) multiplication u32 * u32 -> u64. (a & 0xffffffffL) * (b & 0xffffffffL)

 (3) divide and remainder: u64 / u32 -> u32, u64 % u32 -> u32. Because Java does not have unsigned arithmetic, this currently has to be emulated using several lines of Java code, see MutableBigInteger.divideOneWord and divWord.

 (4) 32 bit rotate. (a >>> r) | (a << (32 - r))

Methods for (1)-(3) will probably we defined as part of 4504839, for (4) with 4495754. If that does not happen, I would suggest defining internal APIs for this.

BigInteger and our crypto implementations would need to be modified to use those new methods, but that should be trivial.

The same RFE has been filed against C2 as JDK-4850191.

###@###.### 2003-04-17

                                    

Comments
The problem for C2 was apparently fixed by JDK-4850191. We also have a number of crypto intrinsics already available. Finally, with tiered compilation enabled, performance-critical methods will eventually be compiled/intrinsified by C2, therefore I do not see much benefit for spending time on this issue.
                                     
2017-02-17
EVALUATION

Will try to do this for 1.5.

###@###.### 2003-04-17
                                     
2003-04-17



Hardware and Software, Engineered to Work Together