Correction to previous commit which mistakenly included older versions of some files; now includes the correct LLVM license header
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@107408 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/fp_lib.h b/lib/fp_lib.h
index b3c0104..c8c7234 100644
--- a/lib/fp_lib.h
+++ b/lib/fp_lib.h
@@ -1,8 +1,22 @@
+//===-- lib/fp_lib.h - Floating-point utilities -------------------*- C -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
// This file is a configuration header for soft-float routines in compiler-rt.
-// This file does not provide any part of the compiler-rt interface.
-
+// This file does not provide any part of the compiler-rt interface, but defines
+// many useful constants and utility routines that are used in the
+// implementation of the soft-float routines in compiler-rt.
+//
// Assumes that float and double correspond to the IEEE-754 binary32 and
-// binary64 types, respectively.
+// binary64 types, respectively, and that integer endianness matches floating
+// point endianness on the target platform.
+//
+//===----------------------------------------------------------------------===//
#ifndef FP_LIB_HEADER
#define FP_LIB_HEADER
@@ -12,9 +26,6 @@
#include <limits.h>
#if defined SINGLE_PRECISION
-#if 0
-#pragma mark single definitions
-#endif
typedef uint32_t rep_t;
typedef int32_t srep_t;
@@ -27,9 +38,6 @@
}
#elif defined DOUBLE_PRECISION
-#if 0
-#pragma mark double definitions
-#endif
typedef uint64_t rep_t;
typedef int64_t srep_t;
@@ -52,21 +60,11 @@
#error Either SINGLE_PRECISION or DOUBLE_PRECISION must be defined.
#endif
-#if 0
-#pragma mark -
-#pragma mark integer constants
-#endif
-
#define typeWidth (sizeof(rep_t)*CHAR_BIT)
#define exponentBits (typeWidth - significandBits - 1)
#define maxExponent ((1 << exponentBits) - 1)
#define exponentBias (maxExponent >> 1)
-#if 0
-#pragma mark -
-#pragma mark rep_t constants
-#endif
-
#define implicitBit (REP_C(1) << significandBits)
#define significandMask (implicitBit - 1U)
#define signBit (REP_C(1) << (significandBits + exponentBits))
@@ -77,11 +75,6 @@
#define quietBit (implicitBit >> 1)
#define qnanRep (exponentMask | quietBit)
-#if 0
-#pragma mark -
-#pragma mark generic functions
-#endif
-
static inline rep_t toRep(fp_t x) {
const union { fp_t f; rep_t i; } rep = {.f = x};
return rep.i;