}
/* Convert x to nearest int in all rounding modes, ties have to be rounded
- consistently with roundtoint. If the result is not representible in an
+ consistently with roundtoint. If the result is not representable in an
int32_t then the semantics is unspecified. */
static inline int32_t
converttoint (double_t x)
needed for good precision in non-nearest rounding and !TOINT_INTRINSICS. */
#define EXP_POLY_WIDE 0
/* Use close to nearest rounding toint when !TOINT_INTRINSICS. This may be
- needed for good precision in non-nearest rouning and !EXP_POLY_WIDE. */
+ needed for good precision in non-nearest rounding and !EXP_POLY_WIDE. */
#define EXP_USE_TOINT_NARROW 0
#define EXP2_POLY_ORDER 5
#define EXP2_POLY_WIDE 0
logctail = T[i].logctail;
/* Note: 1/c is j/N or j/N/2 where j is an integer in [N,2N) and
- |z/c - 1| < 1/N, so r = z/c - 1 is exactly representible. */
+ |z/c - 1| < 1/N, so r = z/c - 1 is exactly representable. */
#if HAVE_FAST_FMA
r = fma (z, invc, -1.0);
#else
if (topx == 0)
{
/* Normalize subnormal x so exponent becomes negative. */
- /* Without the barrier some versions of clang evalutate the mul
+ /* Without the barrier some versions of clang evaluate the mul
unconditionally causing spurious overflow exceptions. */
ix = asuint64 (opt_barrier_double (x) * 0x1p52);
ix &= 0x7fffffffffffffff;
tab[i].logctail = (double)(log(c) - logc)
where c is chosen near the center of the subinterval such that 1/c has only a
-few precision bits so z/c - 1 is exactly representible as double:
+few precision bits so z/c - 1 is exactly representable as double:
1/c = center < 1 ? round(N/center)/N : round(2*N/center)/N/2
#define OFF 0x3f330000
/* Subnormal input is normalized so ix has negative biased exponent.
- Output is multiplied by N (POWF_SCALE) if TOINT_INTRINICS is set. */
+ Output is multiplied by N (POWF_SCALE) if TOINT_INTRINSICS is set. */
static inline double_t
log2_inline (uint32_t ix)
{
FILE *f = strcmp (name, "-") == 0 ? stdin : fopen (name, "r");
if (!f)
{
- printf ("openning \"%s\" failed: %m\n", name);
+ printf ("opening \"%s\" failed: %m\n", name);
exit (1);
}
for (;;)
ret
/* First fault failed: only some of the vector is valid.
- Perform the comparision only on the valid bytes. */
+ Perform the comparison only on the valid bytes. */
2: cmpeq p2.b, p0/z, z0.b, z1.b
b.any 1b
ret
/* First fault failed: only some of the vector is valid.
- Perform the comparision only on the valid bytes. */
+ Perform the comparison only on the valid bytes. */
2: cmpeq p2.b, p0/z, z0.b, z1.b /* search for c */
cmpeq p3.b, p0/z, z0.b, 0 /* search for 0 */
orrs p4.b, p0/z, p2.b, p3.b /* c | 0 */
especially on cores with a high number of issue slots per
cycle, as we get much better parallelism out of the operations. */
- /* Start of critial section -- keep to one 64Byte cache line. */
+ /* Start of critical section -- keep to one 64Byte cache line. */
L(loop):
ldp data1, data2, [src], #16
L(realigned):
b 0b
/* First fault failed: only some of the vector is valid.
- Perform the comparisions only on the valid bytes. */
+ Perform the comparisons only on the valid bytes. */
1: cmpeq p3.b, p0/z, z0.b, 0 /* search for 0 */
b.any 2f
"bne 5b\n\t"
"BX LR\n"
- /* src and dst do not have a common word-alignement. Fall back to
+ /* src and dst do not have a common word-alignment. Fall back to
byte copying. */
"4:\n\t"
"ldrb r2, [r1], #1\n\t"
1. Copy the lines not containing commands as is into the output ``.h`` file.
2. Replace the line on which a command occurs with some other text as directed
- by the command. The replacment text can span multiple lines.
+ by the command. The replacement text can span multiple lines.
Command syntax
~~~~~~~~~~~~~~
------------------
Sub-sections below describe the commands currently available. Under each command
-is the discription of the arugments to the command, and the action taken by the
+is the description of the arguments to the command, and the action taken by the
header generation tool when processing a command.
``include_file``
document explains the structure of implementation header files and ``.cpp``
files.
-Implementaion Header File Structure
------------------------------------
+Implementation Header File Structure
+------------------------------------
We will use the ``round`` function from the public ``math.h`` header file as an
example. The ``round`` function will be declared in an internal header file
NOTE: We use a post build ``objcopy`` step to add an alias instead of using
the ``__attribute__((alias))``. For C++, this ``alias`` attribute requires
mangled names of the referees. Using the post build ``objcopy`` step helps
-us avoid putting mangled names with ``alias`` atttributes.
+us avoid putting mangled names with ``alias`` attributes.
// This header file does not have a header guard. It is internal to LLVM libc
// and intended to be used to pick specific definitions without polluting the
-// public headers with unneccesary definitions.
+// public headers with unnecessary definitions.
#if defined(__need_off_t) && !defined(__llvm_libc_off_t_defined)
typedef __INT64_TYPE__ off_t;
-Wframe-larger-than=0
-Werror
-Wno-attributes
- # asan creates asan.module_ctor which uses stack space, causing warinngs.
+ # asan creates asan.module_ctor which uses stack space, causing warnings.
-fno-sanitize=address
DEPENDS
linux_syscall_h
//
//===----------------------------------------------------------------------===//
-// This file is implemented seperately from sigaction.cpp so that we can
+// This file is implemented separately from sigaction.cpp so that we can
// strongly control the options this file is compiled with. __restore_rt cannot
// make any stack allocations so we must ensure this.
// Unblock SIGABRT, raise it, if it was ignored or the handler returned,
// change its action to SIG_DFL, raise it again.
// TODO: When C11 mutexes land:
- // Aquire recursive mutex (in case the current signal handler for SIGABRT
+ // Acquire recursive mutex (in case the current signal handler for SIGABRT
// itself calls abort we don't want to deadlock on the same thread trying
- // to aquire it's own mutex.)
+ // to acquire it's own mutex.)
__llvm_libc::raise(SIGABRT);
__llvm_libc::raise(SIGKILL);
__llvm_libc::_Exit(127);
namespace __llvm_libc {
// TODO: investigate the performance of this function.
-// There might be potential for compiler optmization.
+// There might be potential for compiler optimization.
size_t LLVM_LIBC_ENTRYPOINT(strlen)(const char *src) {
const char *end = src;
while (*end != '\0')
static void CopyRepMovsb(char *__restrict dst, const char *__restrict src,
size_t count) {
- // FIXME: Add MSVC suppport with
+ // FIXME: Add MSVC support with
// #include <intrin.h>
// __movsb(reinterpret_cast<unsigned char *>(dst),
// reinterpret_cast<const unsigned char *>(src), count);
// The futex data has to be exactly 4 bytes long. However, we use a uint type
// here as we do not want to use `_Atomic uint32_t` as the _Atomic keyword which
// is C only. The header stdatomic.h does not define an atomic type
-// corresponding to `uint32_t` or to something which is exaclty 4 bytes wide.
+// corresponding to `uint32_t` or to something which is exactly 4 bytes wide.
using FutexData = atomic_uint;
// We use a tri-state mutex because we want to avoid making syscalls
llvm::cl::desc("The standard header file which is to be generated."),
llvm::cl::value_desc("<header file>"));
llvm::cl::list<std::string> ReplacementValues(
- "args", llvm::cl::desc("Command seperated <argument name>=<value> pairs."),
+ "args", llvm::cl::desc("Command separated <argument name>=<value> pairs."),
llvm::cl::value_desc("<name=value>[,name=value]"));
void ParseArgValuePairs(std::unordered_map<std::string, std::string> &Map) {
LLVM libc's unit test framework is much less featureful as compared to gtest.
But, what is available strives to be exactly like gtest.
-## Will it be made as featurful as gtest in future?
+## Will it be made as featureful as gtest in future?
It is not clear if LLVM libc needs/will need every feature of gtest. We only
intend to extend it on an _as needed_ basis. Hence, it might never be as
// a TRUE or FALSE condition. That is because, C library funtions do not
// return boolean values, but use integral return values to indicate true or
// false conditions. Hence, it is more appropriate to use the other comparison
-// condtions for such cases.
+// conditions for such cases.
enum TestCondition {
Cond_None,
Cond_EQ,
//
// Note: The benchmark is not responsible for serializing the executions of
// `foo`. It is not suitable for measuring, very small & side effect free
-// functions, as the processor is free to execute serveral executions in
+// functions, as the processor is free to execute several executions in
// parallel.
//
// - Options: A set of parameters controlling the stopping conditions for the
FROM debian:10
-# Installing dependecies.
+# Installing dependencies.
RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get install -y build-essential clang subversion git vim \
ninja-build
RUN python -m pip install buildbot-slave==0.8.12
-# Temporary dependecies for AOR tests.
+# Temporary dependencies for AOR tests.
RUN apt-get install -y libmpfr-dev libmpc-dev
# Change linker to gold.