RFR: 8241502: Migrate x86_64.ad to MacroAssembler

John Tortugo github.com+2249648+johntortugo at openjdk.java.net
Sat Mar 6 00:56:04 UTC 2021


On Wed, 17 Feb 2021 18:38:45 GMT, John Tortugo <github.com+2249648+JohnTortugo at openjdk.org> wrote:

>> Here's one way to test both versions, using loadRange as an example.  It's not exactly pretty, but it seems to work.
>> [loadRange.txt](https://github.com/openjdk/jdk/files/5994725/loadRange.txt)
>
> @dean-long - I recently hacked something pretty similar - basically, I added a flag to the CodeSection class to make it print emitted bytes whenever the flag was set, then I created two encoding classes in the AD file to toggle the print flag. That way I was able to _visually_ compare the output of the two versions of the code. Your approach with the CRC is much better. Thanks a lot!

Hi again, here is a quick update on the progress of this and an ask for advice.

I finished doing all conversions. I'm using an automated approach to validate the conversions: for each instruction that I converted I created an `enc_class` (just for debugging purposes) with pretty much the code that @dean-long provided above. However, I'm hitting a limitation on test coverage. I performed 248 conversions, but until now I was able to test only 203! I've tested tier1, tier2, and tier3 with different GCs, different VM options, on Linux and macOS. In other words, I've tried several things that I could think of but I couldn't make C2 use some instructions. 

I created a [Gist with the list of instructions I couldn't test so far](https://gist.github.com/JohnTortugo/c6d09a8ef6160422d6bf0ae5f894c1fe). Can you suggest something I can do to make C2 use those additional instructions?

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

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


More information about the hotspot-compiler-dev mailing list