[PATCH] XCore target add __LITTLE_ENDIAN__ defined macro

Eric Christopher echristo at gmail.com
Wed Mar 5 14:50:36 PST 2014


Consensus given :)

-eric

On Tue, Mar 4, 2014 at 12:48 AM, Robert Lytton <robert at xmos.com> wrote:
> Hi,
>
> Is there consensus if we want to add __LITTLE_ENDIAN__/__BIG_ENDIAN__ as common defines for all targets?
> Or do we want to limit it to only __ORDER_LITTLE_ENDIAN__/__ORDER_BIG_ENDIAN__?
>
> Robert
>
> ________________________________________
> From: Robert Lytton
> Sent: 17 February 2014 10:28
> To: rafael.espindola at gmail.com; Chandler Carruth; Joerg Sonnenberger; Richard Sandiford; Douglas Gregor
> Cc: llvm-commits at cs.uiuc.edu; reviews+D2760+public+b493f8301bfe0345 at llvm-reviews.chandlerc.com
> Subject: RE: [PATCH] XCore target add __LITTLE_ENDIAN__ defined macro
>
> Hi Chandler, Joerg, Richard, Douglas
>
> re: Make __LITTLE_ENDIAN__/__BIG_ENDOAN__ common PredefinedMacros
>
> Would one of you be willing to be an additional reviewer of this patch (D2760)?
>
> Robert
> ________________________________________
> From: Rafael Ávila de Espíndola [rafael.espindola at gmail.com]
> Sent: 16 February 2014 14:35
> To: rafael.espindola at gmail.com; Richard Osborne; Robert Lytton
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [PATCH] XCore target add __LITTLE_ENDIAN__ defined macro
>
>   I just checked gcc, and it is fairly inconsistent as to when __LITTLE_ENDIAN__ is defined. In fact, it is not defined on x86_64 (but we already do).
>
>   It still seems a good idea to be regular about it, so this is good from my point of view.
>   Please just get one more developer to confirm (Chandler, Joerg, Richard or Douglas would do).
>
>
> ================
> Comment at: lib/Frontend/InitPreprocessor.cpp:547
> @@ -545,2 +546,3 @@
>      Builder.defineMacro("__BYTE_ORDER__", "__ORDER_LITTLE_ENDIAN__");
> -
> +    Builder.defineMacro("__LITTLE_ENDIAN__", "1");
> +  }
> ----------------
> This should be just
>  Builder.defineMacro("__LITTLE_ENDIAN__");
> no? Similarly for the big endian case.
>
>
>
> http://llvm-reviews.chandlerc.com/D2760
>
> _______________________________________________
> 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