RFR: 8328998: Encoding support for Intel APX extended general-purpose registers

Steve Dohrmann duke at openjdk.org
Tue Apr 16 18:00:42 UTC 2024


On Tue, 9 Apr 2024 19:44:26 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Add instruction encoding support for Intel APX 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.
>
> How can we be confident that the encoding is correct?  Would it be possible to write tests for this?  Maybe one that disassembles it and compares the result to a 3rd party disassembler offline or in-process hsdis?

Thank you @dean-long for the comment.  I agree, automated testing is needed.  I'm looking into a way to implement something such as you describe.  A lot of manual testing was done prior to posting the PR but such testing is error-prone and is too much work if iterating an implementation.

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

PR Comment: https://git.openjdk.org/jdk/pull/18476#issuecomment-2059652778


More information about the hotspot-compiler-dev mailing list