RFR: 8358333: Use VEX2 prefix in Assembler::psllq

Tobias Hartmann thartmann at openjdk.org
Tue Jun 3 13:03:54 UTC 2025


On Mon, 2 Jun 2025 15:53:17 GMT, Yudi Zheng <yzheng at openjdk.org> wrote:

> While porting the commit https://github.com/openjdk/jdk/commit/0df8c9684b8782ef830e2bd425217864c3f51784 to Graal, I noticed that the Assembler::psllq instruction is using the VEX3 prefix. This results in the instruction being unrecognizable by my outdated version of hsdis. Currently, HotSpot generates the following bytes for vpsllq xmm7, xmm7, 0x34
> https://github.com/openjdk/jdk/blob/0df8c9684b8782ef830e2bd425217864c3f51784/src/hotspot/cpu/x86/stubGenerator_x86_64_cbrt.cpp#L255
> 
> 
> c4 e1 c1 73 f7 34
> 
> 
> By setting the rex_w to WIG, the emitted bytes are:
> 
> 
> c5 c1 73 f7 34

Looks good to me too (assuming you ran this through Oracle testing).

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

Marked as reviewed by thartmann (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25593#pullrequestreview-2892254436


More information about the hotspot-compiler-dev mailing list