[llvm-commits] [llvm] r65274 - in /llvm/trunk: lib/Target/X86/X86CallingConv.td lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/ret-mmx.ll

Dale Johannesen dalej at apple.com
Sun Feb 22 16:24:27 PST 2009


On Feb 22, 2009, at 3:01 PM, Dale Johannesen wrote:
> On Feb 22, 2009, at 12:11 AM, Bill Wendling wrote:
>> On Feb 22, 2009, at 12:05 AM, Evan Cheng wrote:
>>
>>> Author: evancheng
>>> Date: Sun Feb 22 02:05:12 2009
>>> New Revision: 65274
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=65274&view=rev
>>> Log:
>>> Be bug compatible with gcc by returning MMX values in RAX.
>>>
>> Really?! What was this breaking? I hate ruining our ABI just because
>> of GCC. :-)
>
> This isn't what gcc does.  The __m64 type is returned in RAX.   
> __v2si, __v4hi and __v8qi are returned in XMM0 as they are supposed  
> to be.  I am pretty sure it was "right" (i.e. gcc-compatible)   
> before your change.

To clarify, in "it was right", I meant llvm-gcc.  Currently llvm-gcc - 
m64 does a bitcast of MMX types to either double or i64 before  
returning, so I think what you changed in llvm never gets executed.  I  
don't think this is ideal, but it allows llvm more freedom in  
interchanging types that *ought* to be equivalent, and are in other  
contexts.




More information about the llvm-commits mailing list