[llvm-commits] [llvm-gcc-4.2] r49746 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Evan Cheng
evan.cheng at apple.com
Tue Apr 15 16:24:51 PDT 2008
On Apr 15, 2008, at 3:37 PM, Chris Lattner wrote:
>
> On Apr 15, 2008, at 3:18 PM, Devang Patel wrote:
>
>> Author: dpatel
>> Date: Tue Apr 15 17:18:40 2008
>> New Revision: 49746
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=49746&view=rev
>> Log:
>> Handle test cases from gcc.target/x86-64/abi/test_struct_return.c
>
> This looks wrong:
>
>> Elts.push_back(Type::DoubleTy);
>> Bytes -= 16;
>> + } else if (Class[i+1] == X86_64_SSEDF_CLASS && Bytes ==
>> 16) {
>> + // struct {float f[2]; double d; } should be returned in
>> SSE registers.
>> + Elts.push_back(Type::DoubleTy);
>> + Elts.push_back(Type::DoubleTy);
>
> Shouldn't this be <4 x float> [or <2 x float> if that works], double
> for performance?
I think X86_64_SSE_CLASS + X86_64_SSEDF_CLASS does mean passing two
doubles.
But I am confused. This is
llvm_x86_64_should_pass_aggregate_in_mixed_regs? It's used to
determine argument passing, not return values. Are you fixing function
return or argument passing?
Evan
>
>
>
>> + } else if (Class[i+1] == X86_64_INTEGER_CLASS) {
>> + // struct { float f[2]; char c; } should be returned in
>> SSE(low)
>> + // and INT (high).
>> + Elts.push_back(VectorType::get(Type::FloatTy, 2));
>> + Elts.push_back(Type::DoubleTy);
>
> The second half should be i64 for correctness, no?
>
> -Chris
>
> _______________________________________________
> 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