[llvm] r203664 - Update the datalayout string for ppc64LE.
Rafael EspĂndola
rafael.espindola at gmail.com
Wed Mar 12 08:14:24 PDT 2014
you should also update clang and make sure that it is tested in
test/CodeGen/target-data.c.
On 12 March 2014 10:59, Will Schmidt <will_schmidt at vnet.ibm.com> wrote:
> Author: willschm
> Date: Wed Mar 12 09:59:17 2014
> New Revision: 203664
>
> URL: http://llvm.org/viewvc/llvm-project?rev=203664&view=rev
> Log:
> Update the datalayout string for ppc64LE.
>
> Update the datalayout string for ppc64LE.
>
>
> Modified:
> llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
>
> Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=203664&r1=203663&r2=203664&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Wed Mar 12 09:59:17 2014
> @@ -37,8 +37,13 @@ extern "C" void LLVMInitializePowerPCTar
> static std::string getDataLayoutString(const PPCSubtarget &ST) {
> const Triple &T = ST.getTargetTriple();
>
> - // PPC is big endian.
> - std::string Ret = "E";
> + std::string Ret;
> +
> + // Most PPC* platforms are big endian, PPC64LE is little endian.
> + if (ST.isLittleEndian())
> + Ret = "e";
> + else
> + Ret = "E";
>
> Ret += DataLayout::getManglingComponent(T);
>
>
>
> _______________________________________________
> 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