x86inc: Optimize VEX instruction encoding
authorHenrik Gramner <henrik@gramner.com>
Sat, 31 Mar 2018 11:49:56 +0000 (13:49 +0200)
committerHenrik Gramner <henrik@gramner.com>
Mon, 6 Aug 2018 21:24:12 +0000 (23:24 +0200)
commit8badb910847e94abb66686009e424bdce355c9f4
tree8324ef16bb054492572e361e94f9705bfa366e22
parent0a84d986e7020f8344f00752e3600b9769cc1e85
x86inc: Optimize VEX instruction encoding

Most VEX-encoded instructions require an additional byte to encode when src2
is a high register (e.g. x|ymm8..15). If the instruction is commutative we
can swap src1 and src2 when doing so reduces the instruction length, e.g.

    vpaddw xmm0, xmm0, xmm8 -> vpaddw xmm0, xmm8, xmm0
common/x86/x86inc.asm