[libc] NFC: Fix trivial typo in comments, documents, and messages

Differential Revision: https://reviews.llvm.org/D77462
This commit is contained in:
Kazuaki Ishizaki 2020-04-06 16:18:55 +09:00
parent 1e34ab98fc
commit 0570de73c4
24 changed files with 31 additions and 31 deletions

View File

@ -108,7 +108,7 @@ roundtoint (double_t x)
}
/* 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 @@ extern const struct powf_log2_data
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

View File

@ -58,7 +58,7 @@ log_inline (uint64_t ix, double_t *tail)
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 @@ pow (double x, double y)
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;

View File

@ -41,7 +41,7 @@ and z falls into the ith one, then table entries are computed as
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

View File

@ -26,7 +26,7 @@ relerr_exp2: 1.69 * 2^-34 (Relative error of exp2(ylogx).)
#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)
{

View File

@ -635,7 +635,7 @@ readtrace (const char *name)
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 (;;)

View File

@ -48,7 +48,7 @@ __memchr_aarch64_sve:
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

View File

@ -57,7 +57,7 @@ FUNC:
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 */

View File

@ -67,7 +67,7 @@ ENTRY_ALIGN (__strnlen_aarch64, 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):

View File

@ -46,7 +46,7 @@ __strrchr_aarch64_sve:
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

View File

@ -120,7 +120,7 @@ __strcpy_arm (char* dst, const char* src)
"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"

View File

@ -20,7 +20,7 @@ reading a ``.h.def`` file, the header generation tool does two things:
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 @@ Available Commands
------------------
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``

View File

@ -22,8 +22,8 @@ implementation header file will be ``src/math/round/round.h``. The rest of this
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 @@ a post build step. For example, for the ``round`` function, one can use
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.

View File

@ -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;

View File

@ -22,7 +22,7 @@ add_object_library(
-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

View File

@ -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.

View File

@ -19,9 +19,9 @@ void LLVM_LIBC_ENTRYPOINT(abort)() {
// 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);

View File

@ -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')

View File

@ -4,7 +4,7 @@ namespace __llvm_libc {
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);

View File

@ -19,7 +19,7 @@ namespace __llvm_libc {
// 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

View File

@ -25,7 +25,7 @@ llvm::cl::opt<std::string> StandardHeader(
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) {

View File

@ -16,7 +16,7 @@ mixup/conflict problems.
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

View File

@ -25,7 +25,7 @@ class RunContext;
// 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,

View File

@ -174,7 +174,7 @@ public:
//
// 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

View File

@ -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 @@ 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.