[PATCH] Add support for generating MIPS legacy NaN
Daniel Sanders
daniel.sanders at imgtec.com
Thu Feb 26 09:02:57 PST 2015
LGTM with a couple tiny nits.
================
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 {
----------------
Small nit: The grammar is a little odd, possibly a missing word? Maybe use 'Only MIPS allows a different encoding'
================
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)
----------------
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...".
http://reviews.llvm.org/D7882
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list