RFR: 8328998: Encoding support for Intel APX extended general-purpose registers
Steve Dohrmann
duke at openjdk.org
Tue Apr 16 19:14:44 UTC 2024
On Mon, 15 Apr 2024 17:39:42 GMT, Vladimir Kozlov <kvn 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.
>
> src/hotspot/cpu/x86/assembler_x86.hpp line 790:
>
>> 788: int vex_prefix_and_encode(int dst_enc, int nds_enc, int src_enc,
>> 789: VexSimdPrefix pre, VexOpcode opc,
>> 790: InstructionAttr *attributes, bool src_is_gpr = false);
>
> I saw a lot of usage of this method with `src_is_gpr` is `true`. What is actual most common case?
Thanks @vnkozlov. I believe false is the most common case. If I counted right, I see 400+ calls total and 37 calls with src_is_gpr set to true.
> src/hotspot/cpu/x86/assembler_x86.hpp line 796:
>
>> 794:
>> 795: int simd_prefix_and_encode(XMMRegister dst, XMMRegister nds, XMMRegister src, VexSimdPrefix pre,
>> 796: VexOpcode opc, InstructionAttr *attributes, bool src_is_gpr = false);
>
> Same question as for `vex_prefix_and_encode`
Thanks @vnkozlov. I believe false is the most common case here too. Again, if my counts are close, I see ~180 calls total and 12 calls with src_is_gpr = true.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18476#discussion_r1567831813
PR Review Comment: https://git.openjdk.org/jdk/pull/18476#discussion_r1567832045
More information about the hotspot-compiler-dev
mailing list