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

Jatin Bhateja jbhateja at openjdk.org
Thu Oct 17 02:41:21 UTC 2024


On Wed, 16 Oct 2024 21:13:57 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 16 additional commits since the last revision:
> 
>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into apx-test-tool
>  - Add comment and defined
>  - Add copyright header
>  - Remove tab
>  - Remove whitespace
>  - Replace whitespace with tab
>  - Add flag before testing
>  - Fix assertion error on MacOS
>  - Add _LP64 flag
>  - Add missing header
>  - ... and 6 more: https://git.openjdk.org/jdk/compare/8405335e...ca48f240

test/hotspot/gtest/x86/x86-asmtest.py line 655:

> 653: }
> 654: 
> 655: for RegOp, ops in instruction_set.items():

Rest of the code is modular, can you kindly refactor following code into a top level routine called from __main__ method.

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

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


More information about the hotspot-compiler-dev mailing list