[cfe-commits] [PATCH][PR-11867] Fix "long double" and __SIZE_TYPE__ on powerpc

Nico Weber thakis at chromium.org
Mon Jan 30 16:34:26 PST 2012


On Mon, Jan 30, 2012 at 4:30 PM, Jeremy Huddleston <jeremyhu at apple.com> wrote:
>
> On Jan 30, 2012, at 3:55 PM, Nico Weber wrote:
>
>> Hi Jeremy,
>>
>> this breaks test/Preprocessor/init.c for the PPC targets. I suppose
>> that's intended, but I'm not sure.
>
> Yeah.  The test is wrong.
>
>> I'll revert this for now – can you
>> post a patch with an updated test too?
>
> I haven't actually messed with the tests before, but I'll give it a shot.

cd tools/clang
make test

These give you the actual output:

 ../../Release+Asserts/bin/clang -cc1 -E -dM -ffreestanding
-triple=powerpc-none-none -fno-signed-char test/Preprocessor/init.c
 ../../Release+Asserts/bin/clang -cc1 -E -dM -ffreestanding
-triple=powerpc64-none-none -fno-signed-char test/Preprocessor/init.c

Nico

>
>>
>> Thanks,
>> Nico
>>
>> On Mon, Jan 30, 2012 at 2:29 PM, Nico Weber <thakis at chromium.org> wrote:
>>> r149285. Thanks!
>>>
>>> On Mon, Jan 30, 2012 at 2:18 PM, Jeremy Huddleston <jeremyhu at apple.com> wrote:
>>>> Would you mind pushing it then? =)
>>>>
>>>> Thanks.
>>>>
>>>> On Jan 28, 2012, at 11:22 AM, Chris Lattner wrote:
>>>>
>>>>> Looks good to me,
>>>>>
>>>>> -Chris
>>>>>
>>>>> On Jan 27, 2012, at 3:16 PM, Jeremy Huddleston wrote:
>>>>>
>>>>>> http://llvm.org/bugs/show_bug.cgi?id=11867
>>>>>>
>>>>>> Index: lib/Basic/Targets.cpp
>>>>>> ===================================================================
>>>>>> --- lib/Basic/Targets.cpp    (revision 149121)
>>>>>> +++ lib/Basic/Targets.cpp    (working copy)
>>>>>> @@ -564,7 +564,10 @@
>>>>>>  static const char * const GCCRegNames[];
>>>>>>  static const TargetInfo::GCCRegAlias GCCRegAliases[];
>>>>>> public:
>>>>>> -  PPCTargetInfo(const std::string& triple) : TargetInfo(triple) {}
>>>>>> +  PPCTargetInfo(const std::string& triple) : TargetInfo(triple) {
>>>>>> +    LongDoubleWidth = LongDoubleAlign = 128;
>>>>>> +    LongDoubleFormat = &llvm::APFloat::PPCDoubleDouble;
>>>>>> +  }
>>>>>>
>>>>>>  virtual void getTargetBuiltins(const Builtin::Info *&Records,
>>>>>>                                 unsigned &NumRecords) const {
>>>>>> @@ -840,6 +843,7 @@
>>>>>>                        "i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32";
>>>>>>
>>>>>>    switch (getTriple().getOS()) {
>>>>>> +    case llvm::Triple::Linux:
>>>>>>    case llvm::Triple::FreeBSD:
>>>>>>    case llvm::Triple::NetBSD:
>>>>>>      SizeType = UnsignedInt;
>>>>>>
>>>>>> _______________________________________________
>>>>>> cfe-commits mailing list
>>>>>> cfe-commits at cs.uiuc.edu
>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>>>
>>>>
>>>> _______________________________________________
>>>> cfe-commits mailing list
>>>> cfe-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>




More information about the cfe-commits mailing list