RFR: 8328998: Encoding support for Intel APX extended general-purpose registers [v23]
Emanuel Peter
epeter at openjdk.org
Tue May 21 06:11:06 UTC 2024
On Fri, 17 May 2024 17:52:31 GMT, Steve Dohrmann <duke 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.
>
> Steve Dohrmann has updated the pull request incrementally with one additional commit since the last revision:
>
> added comment about UseAPX and UseAVX > 2 correspondence
Changes requested by epeter (Reviewer).
src/hotspot/cpu/x86/assembler_x86.cpp line 1668:
> 1666: void Assembler::andnl(Register dst, Register src1, Register src2) {
> 1667: assert(VM_Version::supports_bmi1(), "bit manipulation instructions not supported");
> 1668: assert(!needs_eevex(dst, src1, src2) || UseAPX, "extended gpr use requires UseAPX and UseAVX > 2");
Technical detail: `UseAPX and UseAVX > 2` sounds wrong. Did you mean to say "or"? Because UseAPX is only enabled when `UseAVX >= 3`.
src/hotspot/cpu/x86/assembler_x86.cpp line 2036:
> 2034: InstructionMark im(this);
> 2035: if (needs_eevex(crc, adr.base(), adr.index())) {
> 2036: assert(UseAPX, "extended gpr use requires UseAPX and UseAVX > 2");
Maybe here the "and" makes sense, but not sure.
src/hotspot/cpu/x86/vm_version_x86.cpp line 1008:
> 1006: if (UseAPX && (UseAVX < 3)) {
> 1007: if (!FLAG_IS_DEFAULT(UseAPX)) {
> 1008: warning("UseAPX is only available when UseAVX > 2");
Suggestion:
warning("UseAPX is only available when UseAVX > 2. Disabling UseAPX.");
-------------
PR Review: https://git.openjdk.org/jdk/pull/18476#pullrequestreview-2067611924
PR Review Comment: https://git.openjdk.org/jdk/pull/18476#discussion_r1607690139
PR Review Comment: https://git.openjdk.org/jdk/pull/18476#discussion_r1607691284
PR Review Comment: https://git.openjdk.org/jdk/pull/18476#discussion_r1607694066
More information about the hotspot-compiler-dev
mailing list