Skip to content
  • Henrik Gramner's avatar
    x86inc: Optimize VEX instruction encoding · 8badb910
    Henrik Gramner authored
    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
    8badb910