[PATCH] Add support for generating MIPS legacy NaN
Vladimir Radosavljevic
vladimir.radosavljevic at rt-rk.com
Thu Feb 26 09:16:28 PST 2015
================
Comment at: include/clang/Basic/TargetInfo.h:642
@@ +641,3 @@
+ /// \brief Returns true if NaN encoding is IEEE 754-2008.
+ /// Only on MIPS can be different encoding.
+ virtual bool isNan2008() const {
----------------
dsanders wrote:
> Small nit: The grammar is a little odd, possibly a missing word? Maybe use 'Only MIPS allows a different encoding'
Done.
================
Comment at: lib/AST/ExprConstant.cpp:7599-7603
@@ +7598,7 @@
+ } else {
+ // Prior to IEEE 754-2008, architectures were allowed to choose the
+ // first bit of their significand set for qNaN and sNaN. MIPS chose
+ // different encoding to what became a standard in 2008, and for pre-
+ // 2008 revisions, MIPS interpreted sNaN-2008 as qNan and qNaN-2008 as
+ // sNaN. This is now known as "legacy NaN" encoding.
+ if (SNaN)
----------------
dsanders wrote:
> Just a couple tiny grammar nits:
>
> "...to choose the first bit of their significand set for qNaN and sNaN." -> "...to choose whether the first bit of their significand was set for qNaN or sNaN."
>
> "MIPS chose different encoding..." -> "MIPS chose a different encoding...".
Done.
http://reviews.llvm.org/D7882
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list