RFR[M]: Adding MD5 Intrinsic on x86-64

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon Aug 3 17:10:40 UTC 2020

Hi Ludovic

This is very professional work!

CCing to Core-libs because you modified Java code and need review from Java library group.

Few notes:

Add tests to verify intrinsic implementation. You can use test/hotspot/jtreg/compiler/intrinsics/sha/ as examples.

In vm_version_x86.cpp move UseMD5Intrinsics flag setting near UseSHA flag setting.

In new file macroAssembler_x86_md5.cpp no need empty line after copyright line. There is also typo 'rrdistribute':

  * This code is free software; you can rrdistribute it and/or modify it

Our validate-headers check failed. See GPL header template: ./make/templates/gpl-header

Ludovic, it looks like you used only general instructions to implement this code. Can you add comment where the 
algorithm come from? Or it is just direct translation of Java code?

Vivek, do we have SSE/AVX instructions which may improve performance of this code? It could be follow up update if we can.

Did you test it on 32-bit x86? Would be interesting to see result of artificially switching off AVX and SSE: 
'-XX:UseSSE=0 -XX:UseAVX=0'. It will make sure that only general instructions are needed.


On 8/3/20 7:39 AM, Ludovic Henry wrote:
> Hi,
> A quick follow up on that change. Are you happy with the general approach, or would rather have it done differently?
> JBS: https://bugs.openjdk.java.net/browse/JDK-8250902
> Webrev: http://cr.openjdk.java.net/~luhenry/8250902/webrev.01/
> Thank you
> Ludovic

More information about the core-libs-dev mailing list