RFR: 8328998: Encoding support for Intel APX extended general-purpose registers [v8]
Sandhya Viswanathan
sviswanathan at openjdk.org
Mon Apr 29 23:31:07 UTC 2024
On Mon, 29 Apr 2024 21:55: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:
>
> add egpr support for popcntq(R,A), cvttsd2siq(R,A), popq(R)
src/hotspot/cpu/x86/assembler_x86.cpp line 1941:
> 1939: if (needs_rex2(crc, v)) {
> 1940: InstructionAttr attributes(AVX_128bit, /* rex_w */ sizeInBytes == 8, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
> 1941: int encode = vex_prefix_and_encode(crc->encoding(), 0, v->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C, &attributes, true);
The PP bits are VEX_SIMD_66 if sizeInBytes=2.
src/hotspot/cpu/x86/assembler_x86.cpp line 1989:
> 1987: InstructionAttr attributes(AVX_128bit, /* vex_w */ sizeInBytes == 8, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
> 1988: attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit);
> 1989: vex_prefix(adr, 0, crc->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C, &attributes);
The PP bits are VEX_SIMD_66 if sizeInBytes=2.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18476#discussion_r1583888619
PR Review Comment: https://git.openjdk.org/jdk/pull/18476#discussion_r1583889127
More information about the hotspot-compiler-dev
mailing list