]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/tdep] Add vex2_to_vex3
authorTom de Vries <tdevries@suse.de>
Fri, 7 Mar 2025 08:25:33 +0000 (09:25 +0100)
committerTom de Vries <tdevries@suse.de>
Fri, 7 Mar 2025 08:25:33 +0000 (09:25 +0100)
commit88eafe30d0b3a6287546e858f2915fc1dacfa2f4
tree57f0a3cd0137bf08864a95aa3d80574c7ccc2a48
parent7b3e2b12ea9726cdd734f1b698a82781f98dafef
[gdb/tdep] Add vex2_to_vex3

I noticed here [1] that the vex2 prefix is essentially a special case of the
vex3 prefix, meaning it's possible to rewrite any insn with a vex2 prefix into
an equivalent one with a vex3 prefix.

Add function vex2_to_vex3 that does precisely that, in the selftests
namespace.

Add a selftest that exercises this function.

Tested on x86_64-linux.

[1] https://en.wikipedia.org/wiki/VEX_prefix
gdb/amd64-tdep.c