[PATCH] Add support for generating MIPS legacy NaN

Petar Jovanovic petar.jovanovic at imgtec.com
Thu Feb 26 06:51:12 PST 2015


================
Comment at: lib/Basic/Targets.cpp:5679
@@ +5678,3 @@
+  bool isNan2008() const override {
+    return IsNan2008 || isNaN2008Default();
+  }
----------------
vradosavljevic wrote:
> dsanders wrote:
> > This isn't quite right. It should just be IsNan2008 since IsNan2008 is initialized with the result of isNaN2008Default().
> When you generating code for mips32r6/mips64r6 with option -mnan=legacy, IsNan2008 will be set to false.
> In function handleTargetFeatures there are lines that change that.
>       else if (*it == "-nan2008")
>         IsNan2008 = false;
> Because of that, I use the result of isNaN2008Default().
We should not allow that case. Clang should (at least) issue a warning if "-mnan=legacy" is passed for the revisions that do not support the NaN legacy encoding.

http://reviews.llvm.org/D7882

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






More information about the cfe-commits mailing list