PATCH: Use 2-byte VEX prefix if possible
H.J. Lu
hjl.tools@gmail.com
Tue Dec 23 00:10:00 GMT 2008
On Mon, Dec 22, 2008 at 7:47 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>> Btw., in an entirely different context I noticed that this operand swapping
>> may be desirable elsewhere: vmovq and vmovss (perhaps other?) in some
>> case currently use the longer encoding starting with opcode 0xc4 on
>> x86-64 when, by using the alternative base opcode, the short 0xc5-based
>> encoding could be used - just look at the disassembly of this fragment:
>>
>> .intel_syntax noprefix
>> .text
>> .code64
>> Start64:
>> vmovq xmm15, xmm0
>> vmovq xmm0, xmm15
>> .byte 0xc5, 0x79, 0xd6, 0xf8 # vmovq xmm0, xmm15
>>
>> vmovss xmm15, xmm0, xmm0
>> vmovss xmm0, xmm15, xmm0
>> vmovss xmm0, xmm0, xmm15
>> .byte 0xc5, 0x7a, 0x11, 0xf8 # vmovss xmm0, xmm0, xmm15
>>
>> As the assembler generally uses the shortest possible encoding, it should
>> do so in these cases too, I would think.
>>
>
Here is the patch. I will check it in after some testing.
--
H.J.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: binutils-swap-1.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20081223/9f9623c4/attachment.ksh>
More information about the Binutils
mailing list