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

Yudi Zheng yzheng at openjdk.org
Mon Jun 2 15:58:25 UTC 2025


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

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

Commit messages:
 - Use VEX2 prefix in Assembler::psllq

Changes: https://git.openjdk.org/jdk/pull/25593/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25593&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8358333
  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/25593.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25593/head:pull/25593

PR: https://git.openjdk.org/jdk/pull/25593


More information about the hotspot-compiler-dev mailing list