RFR: 8328998: Encoding support for Intel APX extended general-purpose registers [v7]
Sandhya Viswanathan
sviswanathan at openjdk.org
Mon Apr 29 22:09:07 UTC 2024
On Sat, 27 Apr 2024 00:07:21 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:
>
> fix 4 more src_is_gpr = true cases, add asserts to check for UseAPX
src/hotspot/cpu/x86/assembler_x86.cpp line 2632:
> 2630: prefix(src, true /* is_map1 */);
> 2631: emit_int8((unsigned char)0xAE);
> 2632: emit_operand(as_Register(2), src, 0);
Even when UseAVX > 0, if the src address uses higher bank registers, ldmxcsr/stmxcsr should be encoded using the REX2 i.e. the else path.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18476#discussion_r1583835712
More information about the hotspot-compiler-dev
mailing list