r243255 - [Targets] Define _M_AMD64 and _M_X64 to a more appropriate value

David Majnemer david.majnemer at gmail.com
Sun Jul 26 18:06:19 PDT 2015


On Sunday, July 26, 2015, Sean Silva <chisophugis at gmail.com> wrote:

>
>
> On Sun, Jul 26, 2015 at 4:17 PM, David Majnemer <david.majnemer at gmail.com
> <javascript:_e(%7B%7D,'cvml','david.majnemer at gmail.com');>> wrote:
>
>> Author: majnemer
>> Date: Sun Jul 26 18:17:29 2015
>> New Revision: 243255
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=243255&view=rev
>> Log:
>> [Targets] Define _M_AMD64 and _M_X64 to a more appropriate value
>>
>> We used to define them to 1, we should have defined them to 100.
>>
>
> Why?
>

Because that's what they do and I see no particular reason to be
gratuitously different.

Do you have a link or something that you could cite in the code here?
>

No, it was found by inspection.


>
>

> -- Sean Silva
>
>
>>
>> Modified:
>>     cfe/trunk/lib/Basic/Targets.cpp
>>     cfe/trunk/test/Preprocessor/predefined-macros.c
>>
>> Modified: cfe/trunk/lib/Basic/Targets.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=243255&r1=243254&r2=243255&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Basic/Targets.cpp (original)
>> +++ cfe/trunk/lib/Basic/Targets.cpp Sun Jul 26 18:17:29 2015
>> @@ -4000,8 +4000,8 @@ public:
>>                          MacroBuilder &Builder) const override {
>>      WindowsX86_64TargetInfo::getTargetDefines(Opts, Builder);
>>      WindowsX86_64TargetInfo::getVisualStudioDefines(Opts, Builder);
>> -    Builder.defineMacro("_M_X64");
>> -    Builder.defineMacro("_M_AMD64");
>> +    Builder.defineMacro("_M_X64", "100");
>> +    Builder.defineMacro("_M_AMD64", "100");
>>    }
>>  };
>>
>>
>> Modified: cfe/trunk/test/Preprocessor/predefined-macros.c
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/predefined-macros.c?rev=243255&r1=243254&r2=243255&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/test/Preprocessor/predefined-macros.c (original)
>> +++ cfe/trunk/test/Preprocessor/predefined-macros.c Sun Jul 26 18:17:29
>> 2015
>> @@ -18,8 +18,8 @@
>>  // CHECK-MS64: #define _INTEGRAL_MAX_BITS 64
>>  // CHECK-MS64: #define _MSC_EXTENSIONS 1
>>  // CHECK-MS64: #define _MSC_VER 1300
>> -// CHECK-MS64: #define _M_AMD64 1
>> -// CHECK-MS64: #define _M_X64 1
>> +// CHECK-MS64: #define _M_AMD64 100
>> +// CHECK-MS64: #define _M_X64 100
>>  // CHECK-MS64: #define _WIN64 1
>>  // CHECK-MS64-NOT: #define __STRICT_ANSI__
>>  // CHECK-MS64-NOT: GCC
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> <javascript:_e(%7B%7D,'cvml','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/20150726/de5ac039/attachment.html>


More information about the cfe-commits mailing list