From d7b8531c54f1160c36320499011195455b364358 Mon Sep 17 00:00:00 2001 From: RainRat Date: Mon, 10 Jun 2024 17:06:26 -0700 Subject: [PATCH] fix typos --- CMakeLists.txt | 8 ++++---- ChangeLog | 2 +- arch/ARM/ARMDisassembler.c | 2 +- arch/SH/SHInstPrinter.c | 2 +- include/capstone/ppc.h | 4 ++-- packages/rpm/capstone.spec | 2 +- suite/synctools/tablegen/X86/X86.td | 4 ++-- suite/synctools/tablegen/X86/X86_reduce.td | 4 ++-- suite/synctools/tablegen/X86/back/X86.td | 4 ++-- suite/synctools/tablegen/X86/back/X86_reduce.td | 4 ++-- .../include/llvm/CodeGen/GlobalISel/GISelWorkList.h | 2 +- .../include/llvm/CodeGen/GlobalISel/InstructionSelector.h | 2 +- .../synctools/tablegen/include/llvm/CodeGen/ScheduleDAG.h | 2 +- .../tablegen/include/llvm/CodeGen/TargetLowering.h | 4 ++-- .../tablegen/include/llvm/IR/DebugInfoMetadata.h | 2 +- .../include/llvm/ProfileData/Coverage/CoverageMapping.h | 2 +- .../tablegen/include/llvm/ProfileData/InstrProfWriter.h | 2 +- .../tablegen/include/llvm/ProfileData/SampleProf.h | 2 +- 18 files changed, 27 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5ef275162..31c6c982aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,16 +27,16 @@ project(capstone set(UNIX_COMPILER_OPTIONS -Werror -Wall -Warray-bounds -Wshift-negative-value -Wreturn-type -Wformat -Wmissing-braces -Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context -Wmisleading-indentation) -# maybe-unitialzied is only supported by newer versions of GCC. +# maybe-uninitialized is only supported by newer versions of GCC. # Unfortunately, it is pretty unreliable and reports wrong results. # So we disable it for all compilers versions which support it. include(CheckCCompilerFlag) -check_c_compiler_flag("-Wno-maybe-unitialized" SUPPORTS_MU) +check_c_compiler_flag("-Wno-maybe-uninitialized" SUPPORTS_MU) check_c_compiler_flag("-Wshadow=local" SUPPORTS_SHADOWING) check_c_compiler_flag("-Wsometimes-uninitialized" SUPPORTS_SUNINIT) if (SUPPORTS_MU) - set(UNIX_COMPILER_OPTIONS ${UNIX_COMPILER_OPTIONS} -Wno-maybe-unitialized) + set(UNIX_COMPILER_OPTIONS ${UNIX_COMPILER_OPTIONS} -Wno-maybe-uninitialized) endif() if (SUPPORTS_SHADOWING) @@ -54,7 +54,7 @@ else() endif() -# to configure the options specify them in in the command line or change them in the cmake UI. +# to configure the options specify them in the command line or change them in the cmake UI. # Don't edit the makefile! option(BUILD_SHARED_LIBS "Build shared library" OFF) option(CAPSTONE_BUILD_STATIC_RUNTIME "Embed static runtime" ${BUILD_SHARED_LIBS}) diff --git a/ChangeLog b/ChangeLog index ee4e3fb748..3e759bcd1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -771,7 +771,7 @@ Version 3.0.1: February 03rd, 2015 the enumeration of disassembled instructions. - Fix a NULL memory access issue when SKIPDATA & Detail modes are enable at the same time. -- Fix a memory leaking bug when when we stop enumeration over the disassembled +- Fix a memory leaking bug when we stop enumeration over the disassembled instructions prematurely. - Export generic operand types & groups (CS_OP_xxx & CS_GRP_xxx). diff --git a/arch/ARM/ARMDisassembler.c b/arch/ARM/ARMDisassembler.c index 383c7b1be1..41c343ddd9 100644 --- a/arch/ARM/ARMDisassembler.c +++ b/arch/ARM/ARMDisassembler.c @@ -6409,7 +6409,7 @@ static DecodeStatus DecoderForMRRC2AndMCRR2(MCInst *Inst, unsigned Val, // We have to check if the instruction is MRRC2 // or MCRR2 when constructing the operands for // Inst. Reason is because MRRC2 stores to two - // registers so it's tablegen desc has has two + // registers so its tablegen desc has two // outputs whereas MCRR doesn't store to any // registers so all of its operands are listed // as inputs, therefore the operand order for diff --git a/arch/SH/SHInstPrinter.c b/arch/SH/SHInstPrinter.c index 2070835402..3009533fb6 100644 --- a/arch/SH/SHInstPrinter.c +++ b/arch/SH/SHInstPrinter.c @@ -53,7 +53,7 @@ void SH_get_insn_id(cs_struct* h, cs_insn* insn, unsigned int id) #ifndef CAPSTONE_DIET static const char* const s_insn_names[] = { - "unknwon", + "unknown", "add", "add", "addc", "addv", "and", "band", "bandnot", "bclr", "bf", "bf/s", "bld", "bldnot", "bor", "bornot", "bra", "braf", diff --git a/include/capstone/ppc.h b/include/capstone/ppc.h index 820dc06a1a..f308b4df2e 100644 --- a/include/capstone/ppc.h +++ b/include/capstone/ppc.h @@ -115,8 +115,8 @@ typedef enum ppc_pred { /// CR field indices and their meaning. typedef enum { - PPC_BI_LT = 0, ///< CR bit Less Then - PPC_BI_GT = 1, ///< CR bit Greater Then + PPC_BI_LT = 0, ///< CR bit Less Than + PPC_BI_GT = 1, ///< CR bit Greater Than PPC_BI_Z = 2, ///< CR bit Zero PPC_BI_SO = 3, ///< CR bit Summary Overflow PPC_BI_INVALID = 0xff, ///< CR bit was not set/invalid diff --git a/packages/rpm/capstone.spec b/packages/rpm/capstone.spec index 7486bd5982..738187445c 100644 --- a/packages/rpm/capstone.spec +++ b/packages/rpm/capstone.spec @@ -118,7 +118,7 @@ make check LD_LIBRARY_PATH="`pwd`" %doc LICENSE.TXT LICENSE_LLVM.TXT %else %license LICENSE.TXT LICENSE_LLVM.TXT -%endif # %license workarond for RHEL<7 +%endif # %license workaround for RHEL<7 %doc README ChangeLog %{_libdir}/*.so.* diff --git a/suite/synctools/tablegen/X86/X86.td b/suite/synctools/tablegen/X86/X86.td index 63c2dc4da6..d51d1acccd 100644 --- a/suite/synctools/tablegen/X86/X86.td +++ b/suite/synctools/tablegen/X86/X86.td @@ -315,12 +315,12 @@ def FeatureFastLZCNT : SubtargetFeature< "fast-lzcnt", "HasFastLZCNT", "true", "LZCNT instructions are as fast as most simple integer ops">; -// If the target can efficiently decode NOPs upto 11-bytes in length. +// If the target can efficiently decode NOPs up to 11-bytes in length. def FeatureFast11ByteNOP : SubtargetFeature< "fast-11bytenop", "HasFast11ByteNOP", "true", "Target can quickly decode up to 11 byte NOPs">; -// If the target can efficiently decode NOPs upto 15-bytes in length. +// If the target can efficiently decode NOPs up to 15-bytes in length. def FeatureFast15ByteNOP : SubtargetFeature< "fast-15bytenop", "HasFast15ByteNOP", "true", diff --git a/suite/synctools/tablegen/X86/X86_reduce.td b/suite/synctools/tablegen/X86/X86_reduce.td index cf2ce68908..c21942edcb 100644 --- a/suite/synctools/tablegen/X86/X86_reduce.td +++ b/suite/synctools/tablegen/X86/X86_reduce.td @@ -315,12 +315,12 @@ def FeatureFastLZCNT : SubtargetFeature< "fast-lzcnt", "HasFastLZCNT", "true", "LZCNT instructions are as fast as most simple integer ops">; -// If the target can efficiently decode NOPs upto 11-bytes in length. +// If the target can efficiently decode NOPs up to 11-bytes in length. def FeatureFast11ByteNOP : SubtargetFeature< "fast-11bytenop", "HasFast11ByteNOP", "true", "Target can quickly decode up to 11 byte NOPs">; -// If the target can efficiently decode NOPs upto 15-bytes in length. +// If the target can efficiently decode NOPs up to 15-bytes in length. def FeatureFast15ByteNOP : SubtargetFeature< "fast-15bytenop", "HasFast15ByteNOP", "true", diff --git a/suite/synctools/tablegen/X86/back/X86.td b/suite/synctools/tablegen/X86/back/X86.td index 63c2dc4da6..d51d1acccd 100644 --- a/suite/synctools/tablegen/X86/back/X86.td +++ b/suite/synctools/tablegen/X86/back/X86.td @@ -315,12 +315,12 @@ def FeatureFastLZCNT : SubtargetFeature< "fast-lzcnt", "HasFastLZCNT", "true", "LZCNT instructions are as fast as most simple integer ops">; -// If the target can efficiently decode NOPs upto 11-bytes in length. +// If the target can efficiently decode NOPs up to 11-bytes in length. def FeatureFast11ByteNOP : SubtargetFeature< "fast-11bytenop", "HasFast11ByteNOP", "true", "Target can quickly decode up to 11 byte NOPs">; -// If the target can efficiently decode NOPs upto 15-bytes in length. +// If the target can efficiently decode NOPs up to 15-bytes in length. def FeatureFast15ByteNOP : SubtargetFeature< "fast-15bytenop", "HasFast15ByteNOP", "true", diff --git a/suite/synctools/tablegen/X86/back/X86_reduce.td b/suite/synctools/tablegen/X86/back/X86_reduce.td index cf2ce68908..c21942edcb 100644 --- a/suite/synctools/tablegen/X86/back/X86_reduce.td +++ b/suite/synctools/tablegen/X86/back/X86_reduce.td @@ -315,12 +315,12 @@ def FeatureFastLZCNT : SubtargetFeature< "fast-lzcnt", "HasFastLZCNT", "true", "LZCNT instructions are as fast as most simple integer ops">; -// If the target can efficiently decode NOPs upto 11-bytes in length. +// If the target can efficiently decode NOPs up to 11-bytes in length. def FeatureFast11ByteNOP : SubtargetFeature< "fast-11bytenop", "HasFast11ByteNOP", "true", "Target can quickly decode up to 11 byte NOPs">; -// If the target can efficiently decode NOPs upto 15-bytes in length. +// If the target can efficiently decode NOPs up to 15-bytes in length. def FeatureFast15ByteNOP : SubtargetFeature< "fast-15bytenop", "HasFast15ByteNOP", "true", diff --git a/suite/synctools/tablegen/include/llvm/CodeGen/GlobalISel/GISelWorkList.h b/suite/synctools/tablegen/include/llvm/CodeGen/GlobalISel/GISelWorkList.h index 7d198fada4..5306557de0 100644 --- a/suite/synctools/tablegen/include/llvm/CodeGen/GlobalISel/GISelWorkList.h +++ b/suite/synctools/tablegen/include/llvm/CodeGen/GlobalISel/GISelWorkList.h @@ -41,7 +41,7 @@ class GISelWorkList { // Since we don't know ahead of time how many instructions we're going to add // to the worklist, and migrating densemap's elements is quite expensive - // everytime we resize, only insert to the smallvector (typically during the + // every time we resize, only insert to the smallvector (typically during the // initial phase of populating lists). Before the worklist can be used, // finalize should be called. Also assert with NDEBUG if list is ever used // without finalizing. Note that unlike insert, we won't check for duplicates diff --git a/suite/synctools/tablegen/include/llvm/CodeGen/GlobalISel/InstructionSelector.h b/suite/synctools/tablegen/include/llvm/CodeGen/GlobalISel/InstructionSelector.h index 0f1b11b1b1..3e69831c75 100644 --- a/suite/synctools/tablegen/include/llvm/CodeGen/GlobalISel/InstructionSelector.h +++ b/suite/synctools/tablegen/include/llvm/CodeGen/GlobalISel/InstructionSelector.h @@ -474,7 +474,7 @@ class InstructionSelector { /// Named operands that predicate with 'let PredicateCodeUsesOperands = 1' /// referenced in its argument list. Operands are inserted at index set by /// emitter, it corresponds to the order in which names appear in argument - /// list. Currently such predicates don't have more then 3 arguments. + /// list. Currently such predicates don't have more than 3 arguments. std::array RecordedOperands; MatcherState(unsigned MaxRenderers); diff --git a/suite/synctools/tablegen/include/llvm/CodeGen/ScheduleDAG.h b/suite/synctools/tablegen/include/llvm/CodeGen/ScheduleDAG.h index b5cd74a8b4..c1838196e3 100644 --- a/suite/synctools/tablegen/include/llvm/CodeGen/ScheduleDAG.h +++ b/suite/synctools/tablegen/include/llvm/CodeGen/ScheduleDAG.h @@ -175,7 +175,7 @@ class TargetRegisterInfo; return getKind() == Order && Contents.OrdKind == Barrier; } - /// Tests if this is could be any kind of memory dependence. + /// Tests if this could be any kind of memory dependence. bool isNormalMemoryOrBarrier() const { return (isNormalMemory() || isBarrier()); } diff --git a/suite/synctools/tablegen/include/llvm/CodeGen/TargetLowering.h b/suite/synctools/tablegen/include/llvm/CodeGen/TargetLowering.h index 981cfe648c..6d7df1d1ef 100644 --- a/suite/synctools/tablegen/include/llvm/CodeGen/TargetLowering.h +++ b/suite/synctools/tablegen/include/llvm/CodeGen/TargetLowering.h @@ -3473,7 +3473,7 @@ class TargetLowering : public TargetLoweringBase { /// \p AssumeSingleUse When this parameter is true, this function will /// attempt to simplify \p Op even if there are multiple uses. /// Callers are responsible for correctly updating the DAG based on the - /// results of this function, because simply replacing replacing TLO.Old + /// results of this function, because simply replacing TLO.Old /// with TLO.New will be incorrect when this parameter is true and TLO.Old /// has multiple uses. bool SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits, @@ -3531,7 +3531,7 @@ class TargetLowering : public TargetLoweringBase { /// \p AssumeSingleUse When this parameter is true, this function will /// attempt to simplify \p Op even if there are multiple uses. /// Callers are responsible for correctly updating the DAG based on the - /// results of this function, because simply replacing replacing TLO.Old + /// results of this function, because simply replacing TLO.Old /// with TLO.New will be incorrect when this parameter is true and TLO.Old /// has multiple uses. bool SimplifyDemandedVectorElts(SDValue Op, const APInt &DemandedEltMask, diff --git a/suite/synctools/tablegen/include/llvm/IR/DebugInfoMetadata.h b/suite/synctools/tablegen/include/llvm/IR/DebugInfoMetadata.h index 4dc3d5d2e0..b3e8205893 100644 --- a/suite/synctools/tablegen/include/llvm/IR/DebugInfoMetadata.h +++ b/suite/synctools/tablegen/include/llvm/IR/DebugInfoMetadata.h @@ -2639,7 +2639,7 @@ class DIExpression : public MDNode { enum SignedOrUnsignedConstant { SignedConstant, UnsignedConstant }; /// Determine whether this represents a constant value, if so - // return it's sign information. + // return its sign information. llvm::Optional isConstant() const; /// Return the number of unique location operands referred to (via diff --git a/suite/synctools/tablegen/include/llvm/ProfileData/Coverage/CoverageMapping.h b/suite/synctools/tablegen/include/llvm/ProfileData/Coverage/CoverageMapping.h index 4e1d9030f9..dd3ab73e6b 100644 --- a/suite/synctools/tablegen/include/llvm/ProfileData/Coverage/CoverageMapping.h +++ b/suite/synctools/tablegen/include/llvm/ProfileData/Coverage/CoverageMapping.h @@ -220,7 +220,7 @@ struct CounterMappingRegion { SkippedRegion, /// A GapRegion is like a CodeRegion, but its count is only set as the - /// line execution count when its the only region in the line. + /// line execution count when it's the only region in the line. GapRegion, /// A BranchRegion represents leaf-level boolean expressions and is diff --git a/suite/synctools/tablegen/include/llvm/ProfileData/InstrProfWriter.h b/suite/synctools/tablegen/include/llvm/ProfileData/InstrProfWriter.h index af1e46cf4f..2412a40f72 100644 --- a/suite/synctools/tablegen/include/llvm/ProfileData/InstrProfWriter.h +++ b/suite/synctools/tablegen/include/llvm/ProfileData/InstrProfWriter.h @@ -87,7 +87,7 @@ class InstrProfWriter { return Error::success(); } - // Returns true if merging is should fail assuming A and B are incompatible. + // Returns true if merging should fail assuming A and B are incompatible. auto testIncompatible = [&](InstrProfKind A, InstrProfKind B) { return (static_cast(ProfileKind & A) && static_cast(Other & B)) || diff --git a/suite/synctools/tablegen/include/llvm/ProfileData/SampleProf.h b/suite/synctools/tablegen/include/llvm/ProfileData/SampleProf.h index 50ae26c568..33071a2609 100644 --- a/suite/synctools/tablegen/include/llvm/ProfileData/SampleProf.h +++ b/suite/synctools/tablegen/include/llvm/ProfileData/SampleProf.h @@ -177,7 +177,7 @@ enum class SecCommonFlags : uint32_t { }; // Section specific flags are defined here. -// !!!Note: Everytime a new enum class is created here, please add +// !!!Note: Every time a new enum class is created here, please add // a new check in verifySecFlag. enum class SecNameTableFlags : uint32_t { SecFlagInValid = 0,