RFR: 8248188: Add IntrinsicCandidate and API for Base64 decoding [v5]

CoreyAshford github.com+51754783+coreyashford at openjdk.java.net
Mon Oct 12 21:41:37 UTC 2020


> This patch set encompasses the following commits:
> 
> - Adds a new HotSpot intrinsic candidate to the java.lang.Base64 class - decodeBlock(), and provides a flexible API for
>   the intrinsic.  The API is similar to the existing encodeBlock intrinsic.
> - Adds the code in HotSpot to check and martial the new intrinsic's arguments to the arch-specific intrinsic
>   implementation
> - Adds a Power64LE-specific implementation of the decodeBlock intrinsic.
> - Adds a JMH microbenchmark for both Base64 encoding and encoding.
> - Enhances the JTReg hotspot intrinsic "TestBase64.java" regression test to more fully test both decoding and encoding.

CoreyAshford has updated the pull request incrementally with one additional commit since the last revision:

  Per Martin Doerr's v4 review: fix regression, and speed up return time for buffers that are too small
  
   - Check for case where the result of subtacting 12 off of the source
     length produces a negative number.  To do this efficiently, I added the
     instruction definition for mcrxrx, which is implemented on Power9+.
  
   - Rearrange the code so that minimal initialization is performed before
     checking the size, so that the intrinsic can return quickly in the event
     that the buffer is too small to process.

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/293/files
  - new: https://git.openjdk.java.net/jdk/pull/293/files/164fa2a9..b5acb75c

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=293&range=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=293&range=03-04

  Stats: 54 lines in 3 files changed: 33 ins; 19 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/293.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/293/head:pull/293

PR: https://git.openjdk.java.net/jdk/pull/293


More information about the core-libs-dev mailing list