[PATCH] Add ARM big endian Target (armeb, thumbeb)

Bernard Ogden bernard.ogden at arm.com
Tue Mar 18 03:23:59 PDT 2014

  Hi Christian,

  Again, just a round-the-edges review. Just a few comments:

  1) Could you add the ACLE predefine __ARM_BIG_ENDIAN? (set to 1 for big endian, undefined for little endian, see section 6.3 in http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053b/IHI0053B_arm_c_language_extensions_2013.pdf)
  2) Would like to see tests for the predefine(s) -- __ARMEL__, __ARMEB__, __ARM_BIG_ENDIAN

  Again, how is the testing on the AArch64 side? I think it was specifically your ARM_BE test case that I noticed didn't seem to be there on AArch64.



Comment at: lib/Basic/Targets.cpp:4349
@@ -4296,3 +4348,3 @@
 class DarwinARMTargetInfo :
-  public DarwinTargetInfo<ARMTargetInfo> {
+  public DarwinTargetInfo<ARMleTargetInfo> {
Can I say -target armeb-none-darwin-...? What happens if I do?

Comment at: lib/Driver/Tools.cpp:475
@@ -474,2 +474,3 @@
   case llvm::Triple::arm:
+  case llvm::Triple::armeb:
   case llvm::Triple::ppc:
I wonder if it is a bug that we don't return false for thumb (not asking you to fix it)

Comment at: lib/Driver/Tools.cpp:1774
@@ -1768,2 +1773,3 @@
 static StringRef getArchNameForCompilerRTLib(const ToolChain &TC) {
-  if (TC.getArch() == llvm::Triple::arm)
+  if (TC.getArch() == llvm::Triple::arm ||
+      TC.getArch() == llvm::Triple::armeb)
Again, seems odd that there is no equivalent for thumb (and, again, not asking you to fix)


More information about the cfe-commits mailing list