You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
APX places r16-r31 out of reach of the legacy REX prefix: an
instruction referencing one of them, directly or as the base or index
of a memory operand, has to be encoded with REX2 instead. Add
emit_rex2_or_rex, emit_rex2_or_rex_64, emit_rex2_or_rex_32 and
emit_optional_rex2_or_rex_32, mirroring the existing emit_rex_* family,
which pick REX2 when an operand needs it and fall back to the legacy
prefix otherwise.
REX2 also carries the opcode map in its M0 bit and must be the last
byte before the opcode, so the 0x0F escape byte has to be dropped
exactly when a REX2 prefix is emitted. Rather than report that back to
the call site, the wrappers take the map as a Rex2MapID and emit the
escape byte themselves, so the prefix and the escape cannot get out of
sync. REX2 has a single map bit, so instructions in the 0x0F38 and
0x0F3A maps still need a VEX or EVEX encoding to reach the extended
GPRs.
Bug: 474204750
Change-Id: I102a423e19dc8c1374265248325951caf1ab3ea6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8422347
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Pan, Jie <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#109955}
0 commit comments