diff --git a/libc/AOR_v20.02/math/math_config.h b/libc/AOR_v20.02/math/math_config.h --- a/libc/AOR_v20.02/math/math_config.h +++ b/libc/AOR_v20.02/math/math_config.h @@ -108,7 +108,7 @@ } /* 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) @@ -360,7 +360,7 @@ 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 diff --git a/libc/AOR_v20.02/math/pow.c b/libc/AOR_v20.02/math/pow.c --- a/libc/AOR_v20.02/math/pow.c +++ b/libc/AOR_v20.02/math/pow.c @@ -58,7 +58,7 @@ 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 @@ -348,7 +348,7 @@ 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; diff --git a/libc/AOR_v20.02/math/pow_log_data.c b/libc/AOR_v20.02/math/pow_log_data.c --- a/libc/AOR_v20.02/math/pow_log_data.c +++ b/libc/AOR_v20.02/math/pow_log_data.c @@ -41,7 +41,7 @@ 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 diff --git a/libc/AOR_v20.02/math/powf.c b/libc/AOR_v20.02/math/powf.c --- a/libc/AOR_v20.02/math/powf.c +++ b/libc/AOR_v20.02/math/powf.c @@ -26,7 +26,7 @@ #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) { diff --git a/libc/AOR_v20.02/math/test/mathbench.c b/libc/AOR_v20.02/math/test/mathbench.c --- a/libc/AOR_v20.02/math/test/mathbench.c +++ b/libc/AOR_v20.02/math/test/mathbench.c @@ -635,7 +635,7 @@ 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 (;;) diff --git a/libc/AOR_v20.02/string/aarch64/memchr-sve.S b/libc/AOR_v20.02/string/aarch64/memchr-sve.S --- a/libc/AOR_v20.02/string/aarch64/memchr-sve.S +++ b/libc/AOR_v20.02/string/aarch64/memchr-sve.S @@ -48,7 +48,7 @@ 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 diff --git a/libc/AOR_v20.02/string/aarch64/strchr-sve.S b/libc/AOR_v20.02/string/aarch64/strchr-sve.S --- a/libc/AOR_v20.02/string/aarch64/strchr-sve.S +++ b/libc/AOR_v20.02/string/aarch64/strchr-sve.S @@ -57,7 +57,7 @@ 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 */ diff --git a/libc/AOR_v20.02/string/aarch64/strnlen.S b/libc/AOR_v20.02/string/aarch64/strnlen.S --- a/libc/AOR_v20.02/string/aarch64/strnlen.S +++ b/libc/AOR_v20.02/string/aarch64/strnlen.S @@ -67,7 +67,7 @@ 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): diff --git a/libc/AOR_v20.02/string/aarch64/strrchr-sve.S b/libc/AOR_v20.02/string/aarch64/strrchr-sve.S --- a/libc/AOR_v20.02/string/aarch64/strrchr-sve.S +++ b/libc/AOR_v20.02/string/aarch64/strrchr-sve.S @@ -46,7 +46,7 @@ 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 diff --git a/libc/AOR_v20.02/string/arm/strcpy.c b/libc/AOR_v20.02/string/arm/strcpy.c --- a/libc/AOR_v20.02/string/arm/strcpy.c +++ b/libc/AOR_v20.02/string/arm/strcpy.c @@ -120,7 +120,7 @@ "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" diff --git a/libc/docs/header_generation.rst b/libc/docs/header_generation.rst --- a/libc/docs/header_generation.rst +++ b/libc/docs/header_generation.rst @@ -20,7 +20,7 @@ 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 ~~~~~~~~~~~~~~ @@ -59,7 +59,7 @@ ------------------ 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`` diff --git a/libc/docs/implementation_standard.rst b/libc/docs/implementation_standard.rst --- a/libc/docs/implementation_standard.rst +++ b/libc/docs/implementation_standard.rst @@ -22,8 +22,8 @@ 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 @@ -82,4 +82,4 @@ 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. diff --git a/libc/include/__posix-types.h b/libc/include/__posix-types.h --- a/libc/include/__posix-types.h +++ b/libc/include/__posix-types.h @@ -8,7 +8,7 @@ // 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; diff --git a/libc/src/signal/linux/CMakeLists.txt b/libc/src/signal/linux/CMakeLists.txt --- a/libc/src/signal/linux/CMakeLists.txt +++ b/libc/src/signal/linux/CMakeLists.txt @@ -22,7 +22,7 @@ -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 diff --git a/libc/src/signal/linux/__restore.cpp b/libc/src/signal/linux/__restore.cpp --- a/libc/src/signal/linux/__restore.cpp +++ b/libc/src/signal/linux/__restore.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// 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. diff --git a/libc/src/stdlib/abort.cpp b/libc/src/stdlib/abort.cpp --- a/libc/src/stdlib/abort.cpp +++ b/libc/src/stdlib/abort.cpp @@ -19,9 +19,9 @@ // 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); diff --git a/libc/src/string/strlen.cpp b/libc/src/string/strlen.cpp --- a/libc/src/string/strlen.cpp +++ b/libc/src/string/strlen.cpp @@ -13,7 +13,7 @@ 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') diff --git a/libc/src/string/x86/memcpy_arch_specific.h.inc b/libc/src/string/x86/memcpy_arch_specific.h.inc --- a/libc/src/string/x86/memcpy_arch_specific.h.inc +++ b/libc/src/string/x86/memcpy_arch_specific.h.inc @@ -4,7 +4,7 @@ static void CopyRepMovsb(char *__restrict dst, const char *__restrict src, size_t count) { - // FIXME: Add MSVC suppport with + // FIXME: Add MSVC support with // #include // __movsb(reinterpret_cast(dst), // reinterpret_cast(src), count); diff --git a/libc/src/threads/linux/thread_utils.h b/libc/src/threads/linux/thread_utils.h --- a/libc/src/threads/linux/thread_utils.h +++ b/libc/src/threads/linux/thread_utils.h @@ -19,7 +19,7 @@ // 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 diff --git a/libc/utils/HdrGen/Main.cpp b/libc/utils/HdrGen/Main.cpp --- a/libc/utils/HdrGen/Main.cpp +++ b/libc/utils/HdrGen/Main.cpp @@ -25,7 +25,7 @@ llvm::cl::desc("The standard header file which is to be generated."), llvm::cl::value_desc("
")); llvm::cl::list ReplacementValues( - "args", llvm::cl::desc("Command seperated = pairs."), + "args", llvm::cl::desc("Command separated = pairs."), llvm::cl::value_desc("[,name=value]")); void ParseArgValuePairs(std::unordered_map &Map) { diff --git a/libc/utils/UnitTest/README.md b/libc/utils/UnitTest/README.md --- a/libc/utils/UnitTest/README.md +++ b/libc/utils/UnitTest/README.md @@ -16,7 +16,7 @@ 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 diff --git a/libc/utils/UnitTest/Test.h b/libc/utils/UnitTest/Test.h --- a/libc/utils/UnitTest/Test.h +++ b/libc/utils/UnitTest/Test.h @@ -25,7 +25,7 @@ // 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, diff --git a/libc/utils/benchmarks/LibcBenchmark.h b/libc/utils/benchmarks/LibcBenchmark.h --- a/libc/utils/benchmarks/LibcBenchmark.h +++ b/libc/utils/benchmarks/LibcBenchmark.h @@ -174,7 +174,7 @@ // // 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 diff --git a/libc/utils/buildbot/Dockerfile b/libc/utils/buildbot/Dockerfile --- a/libc/utils/buildbot/Dockerfile +++ b/libc/utils/buildbot/Dockerfile @@ -1,6 +1,6 @@ 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 \ @@ -8,7 +8,7 @@ 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.