[PATCH] Default to armv7 cpu for NaCl when march=arm

Renato Golin renato.golin at linaro.org
Tue Mar 24 15:13:22 PDT 2015


================
Comment at: lib/Support/Triple.cpp:1078
@@ +1077,3 @@
+  case llvm::Triple::NaCl:
+    if (MArch == "arm")
+      return "cortex-a9";
----------------
dschuff wrote:
> rengolin wrote:
> > That's unnecessary, since this is an ARM-only function.
> I think it is what I want because if the user specifies something other than plain "arm" it should override this default.
I see what you mean.

================
Comment at: lib/Support/Triple.cpp:1079
@@ +1078,3 @@
+    if (MArch == "arm")
+      return "cortex-a9";
+    break;
----------------
dschuff wrote:
> rengolin wrote:
> > And cortex-a9 is not the best choice for almost anything. The base ARMv7 is Cortex-A8, and most NaCl devices will probably be running on Cortex-A15.
> OK, noted.
> All NaCl devices that I'm aware of are A15 but the base requirement for NaCl is specified as v7 + NEON.
And that's one of the reasons fixing it here won't work. You can't possibly return here saying "A7+NEON", and neither A7 nor A15 demand NEON.

Clang's driver is a bit silly in that "gnueabihf" is what sets it +hard-fp, at least on Linux, so you'll have to make NaCl smarter about hard float.

http://reviews.llvm.org/D8589

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list