RFR: 8339507: Test generation tool and gtest for testing APX encoding of extended gpr instructions [v7]

Srinivas Vamsi Parasa sparasa at openjdk.org
Mon Oct 21 23:33:19 UTC 2024


On Fri, 18 Oct 2024 23:42:04 GMT, hanklo6 <duke at openjdk.org> wrote:

>> Add test generation tool and gtest for testing APX encoding of instructions with extended general-purpose registers.
>> 
>> Intel Advanced Performance Extensions (APX) doubles the number of general-purpose registers, from 16 to 32. For more information about APX, see https://www.intel.com/content/www/us/en/developer/articles/technical/advanced-performance-extensions-apx.html.
>> 
>> By specification, instruction encoding remains unchanged for instructions using only the lower 16 GPRs. For cases where one or more instruction operands reference extended GPRs (Egprs), encoding targets either REX2, an extension of REX encoding, or an extended version of EVEX encoding. These new encoding schemes extend or modify existing instruction prefixes only when Egprs are used.
>> 
>> ### Generate test instructions
>> With `binutils = 2.43`
>> * `python3 x86-asmtest.py > asmtest.out.h`
>> ### Run test
>> *  `make test TEST="gtest:AssemblerX86"`
>
> hanklo6 has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Refactor
>  - Add missing instructions

test/hotspot/gtest/x86/test_assemblerx86.cpp line 53:

> 51:       stringStream ss;
> 52:       ss.print("%s\n", insn);
> 53:       ss.print("Ours:   ");

"Ours" could be replaced with "OpenJDK encoding".

test/hotspot/gtest/x86/test_assemblerx86.cpp line 58:

> 56:       }
> 57:       ss.print_cr("");
> 58:       ss.print("Theirs: ");

Same as above. "Theirs" could be replaced with "gcc encoding" or something similar.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20857#discussion_r1809656234
PR Review Comment: https://git.openjdk.org/jdk/pull/20857#discussion_r1809656619


More information about the hotspot-compiler-dev mailing list