r222680 - CodeGen: make i686-windows-itanium more similar to msvc

Reid Kleckner rnk at google.com
Mon Nov 24 14:06:15 PST 2014


I went ahead and removed it in r222697.

On Mon, Nov 24, 2014 at 1:54 PM, Reid Kleckner <rnk at google.com> wrote:

> Why do we have this environment switch? All supported environments on
> Windows return small structs in EAX:EDX. Looks like you added it back
> in r204978 and we don't actually need it.
>
> On Mon, Nov 24, 2014 at 12:14 PM, Saleem Abdulrasool <
> compnerd at compnerd.org> wrote:
>
>> Author: compnerd
>> Date: Mon Nov 24 14:14:29 2014
>> New Revision: 222680
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=222680&view=rev
>> Log:
>> CodeGen: make i686-windows-itanium more similar to msvc
>>
>> The itanium environment follows the system calling convention for
>> structures.
>> Pass small aggregates via registers.
>>
>> Modified:
>>     cfe/trunk/lib/CodeGen/TargetInfo.cpp
>>     cfe/trunk/test/CodeGen/windows-struct-abi.c
>>
>> Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=222680&r1=222679&r2=222680&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
>> +++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Mon Nov 24 14:14:29 2014
>> @@ -1307,6 +1307,7 @@ bool X86_32TargetCodeGenInfo::isStructRe
>>      case llvm::Triple::UnknownEnvironment:
>>      case llvm::Triple::Cygnus:
>>      case llvm::Triple::GNU:
>> +    case llvm::Triple::Itanium:
>>      case llvm::Triple::MSVC:
>>        return true;
>>      default:
>>
>> Modified: cfe/trunk/test/CodeGen/windows-struct-abi.c
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/windows-struct-abi.c?rev=222680&r1=222679&r2=222680&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/test/CodeGen/windows-struct-abi.c (original)
>> +++ cfe/trunk/test/CodeGen/windows-struct-abi.c Mon Nov 24 14:14:29 2014
>> @@ -6,7 +6,7 @@ struct f1 {
>>
>>  struct f1 return_f1(void) { while (1); }
>>
>> -// CHECK: define void @return_f1(%struct.f1* noalias sret %agg.result)
>> +// CHECK: define i32 @return_f1()
>>
>>  void receive_f1(struct f1 a0) { }
>>
>> @@ -19,9 +19,24 @@ struct f2 {
>>
>>  struct f2 return_f2(void) { while (1); }
>>
>> -// CHECK: define void @return_f2(%struct.f2* noalias sret %agg.result)
>> +// CHECK: define i64 @return_f2()
>>
>>  void receive_f2(struct f2 a0) { }
>>
>>  // CHECK: define void @receive_f2(%struct.f2* byval align 4 %a0)
>>
>> +struct f4 {
>> +  float f;
>> +  float g;
>> +  float h;
>> +  float i;
>> +};
>> +
>> +struct f4 return_f4(void) { while (1); }
>> +
>> +// CHECK: define void @return_f4(%struct.f4* noalias sret %agg.result)
>> +
>> +void receive_f4(struct f4 a0) { }
>> +
>> +// CHECK: define void @receive_f4(%struct.f4* byval align 4 %a0)
>> +
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141124/41d67b5d/attachment.html>


More information about the cfe-commits mailing list