[llvm-commits] [llvm] r162963 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/MC/X86/x86-64.s

Jim Grosbach grosbach at apple.com
Fri Aug 31 10:22:06 PDT 2012


On Aug 31, 2012, at 9:52 AM, Bill Wendling <wendling at apple.com> wrote:

> On Aug 30, 2012, at 5:30 PM, Jim Grosbach <grosbach at apple.com> wrote:
> 
>> Author: grosbach
>> Date: Thu Aug 30 19:30:30 2012
>> New Revision: 162963
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=162963&view=rev
>> Log:
>> X86: Fix encoding of 'movd %xmm0, %rax'
>> 
>> The assembly string for the VMOVPQIto64rr instruction incorrectly lacked the 'v'
>> prefix, resulting in mis-assembly of the vanilla movd instruction.
>> 
>> Modified:
>>   llvm/trunk/lib/Target/X86/X86InstrSSE.td
>>   llvm/trunk/test/MC/X86/x86-64.s
>> 
>> Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=162963&r1=162962&r2=162963&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
>> +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Thu Aug 30 19:30:30 2012
>> @@ -4538,7 +4538,7 @@
>> // Move Packed Doubleword Int first element to Doubleword Int
>> //
>> def VMOVPQIto64rr : I<0x7E, MRMDestReg, (outs GR64:$dst), (ins VR128:$src),
>> -                          "mov{d|q}\t{$src, $dst|$dst, $src}",
>> +                          "vmov{d|q}\t{$src, $dst|$dst, $src}",
>>                          [(set GR64:$dst, (vector_extract (v2i64 VR128:$src),
>>                                                           (iPTR 0)))],
>>                                                           IIC_SSE_MOVD_ToGP>,
>> 
>> Modified: llvm/trunk/test/MC/X86/x86-64.s
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86-64.s?rev=162963&r1=162962&r2=162963&view=diff
>> ==============================================================================
>> --- llvm/trunk/test/MC/X86/x86-64.s (original)
>> +++ llvm/trunk/test/MC/X86/x86-64.s Thu Aug 30 19:30:30 2012
>> @@ -1164,6 +1164,10 @@
>> // CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7]
>> 	movd %rdi,%xmm0
>> 
>> +// CHECK: movd  %xmm0, %rax
>> +// CHECK: encoding: [0x66,0x48,0x0f,0x7e,0xc0]
>> +        movd  %xmm0, %rax
>> +
> Maybe I'm missing something...but should you be checking for 'vmovd' instead of 'movd'?
> 

We're checking the now-correct encoding of an instruction we were previously mis-assembling due to the missing 'v'.



> -bw
> 
>> // CHECK: movntil %eax, (%rdi)
>> // CHECK: encoding: [0x0f,0xc3,0x07]
>> // CHECK: movntil
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 




More information about the llvm-commits mailing list