This is an archive of the discontinued LLVM Phabricator instance.

ARM: Add command line option to select big or little endian
ClosedPublic

Authored by cpirker on Apr 7 2014, 6:23 AM.

Details

Reviewers
atanasyan
Summary

Hi All,

I added -EL to select little endian and -EB to select big endian ARM targets.
I also added -mlittle-endian as alias for -EL and -mbig-endian as alias for -EB.

Little endian (as e.g. for armv7):
--target=armv7
--target=armv7 -EL
--target=armv7 -mlittle-endian
--target=armebv7 -EL
--target=armebv7 -mlittle-endian

Big endian (as e.g. for armv7):
--target=armebv7
--target=armv7 -EB
--target=armv7 -mbig-endian
--target=armebv7 -EB
--target=armebv7 -mbig-endian

This patch is similar to D3215 for AArch64.
For the ARM target, I implemented the functionality in ToolChain::ComputeLLVMTriple, similar to the -mthumb option.
For the AArch64 target, I implemented the functionality in computeTargetTriple, similar to the MIPS implementation.

Please review.

Thanks,
Christian

Diff Detail

Event Timeline

cpirker updated this revision to Unknown Object (????).Apr 10 2014, 6:26 AM

Hi,

I inverted the aliasing, and removed the -EL/-EB tests.
I made the same in D3215.

Thanks,
Christian

I committed this patch as r205967.

cpirker added a reviewer: atanasyan.EditedMay 15 2014, 1:40 AM

Hi Simon,

I added you as reviewer.
Can you please "Accepted Revision" so that I can "Close Revision"?
As you can see in the comment above, the patch is already committed (rL205967).

Thanks,
Christian

atanasyan accepted this revision.May 15 2014, 1:59 AM
atanasyan edited edge metadata.
This revision is now accepted and ready to land.May 15 2014, 1:59 AM
cpirker closed this revision.May 15 2014, 2:02 AM