RFR: 8339507: Test generation tool and gtest for testing APX encoding of extended gpr instructions [v2]
Vladimir Kozlov
kvn at openjdk.org
Wed Oct 9 22:18:13 UTC 2024
On Wed, 9 Oct 2024 21:47:21 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 one additional commit since the last revision:
>
> Add copyright header
Is this test for both 32- and 64-bits instructions/VMs?
How complete the set of instructions covered by the test?
test/hotspot/gtest/x86/test_assemblerx86.cpp line 26:
> 24: #include "precompiled.hpp"
> 25:
> 26: #if defined(X86)
You may add ` && !defined(ZERO)` similar to `test_assembler_aarch64.cpp` test.
test/hotspot/gtest/x86/test_assemblerx86.cpp line 93:
> 91: address entry = __ pc();
> 92:
> 93: // python x86-asmtest.py | expand > asmtest.out.h
The PR description shows different instructions to build:
With binutils = 2.43
python3 x86-asmtest.py > asmtest.out.h
I would like to have comment with correct and detailed instructions how to build `asmtest.out.h`
-------------
PR Review: https://git.openjdk.org/jdk/pull/20857#pullrequestreview-2358422678
PR Review Comment: https://git.openjdk.org/jdk/pull/20857#discussion_r1794304617
PR Review Comment: https://git.openjdk.org/jdk/pull/20857#discussion_r1794301774
More information about the hotspot-compiler-dev
mailing list