RFR: 8256431: [PPC64] Implement Base64 encodeBlock() for Power64-LE [v4]

Martin Doerr mdoerr at openjdk.java.net
Fri Dec 11 10:12:58 UTC 2020


On Thu, 10 Dec 2020 19:22:18 GMT, Corey Ashford <github.com+51754783+CoreyAshford at openjdk.org> wrote:

>> src/hotspot/cpu/ppc/stubGenerator_ppc.cpp line 4185:
>> 
>>> 4183:       0b00111111, 0b00111100, 0b00110000, 0b00000000 ) };
>>> 4184: 
>>> 4185:     static const __vector unsigned char base64_00_15 = {
>> 
>> I don't really like so many individual arrays of constants. They could get put into one larger block of memory and accessed by lvx with offset.
>
> Interesting idea!  The point there would be to save the initialization time of loading the address constants?  Otherwise, it has a negative affect on code readability.

Right, we could use much shorter code for loading the constants. I don't think readability would suffer if you only put constants of the same kind (like the base64_... ones) into single arrays. And even if you put all constants into one array I guess it could be made readable by good comments. But there may be a trade-off.

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

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


More information about the hotspot-compiler-dev mailing list