Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
RainRat committed Jun 11, 2024
1 parent 8cca03e commit d7b8531
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
2 changes: 1 addition & 1 deletion arch/ARM/ARMDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/SH/SHInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions include/capstone/ppc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/rpm/capstone.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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.*

Expand Down
4 changes: 2 additions & 2 deletions suite/synctools/tablegen/X86/X86.td
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions suite/synctools/tablegen/X86/X86_reduce.td
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions suite/synctools/tablegen/X86/back/X86.td
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions suite/synctools/tablegen/X86/back/X86_reduce.td
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<const MachineOperand *, 3> RecordedOperands;

MatcherState(unsigned MaxRenderers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<SignedOrUnsignedConstant> isConstant() const;

/// Return the number of unique location operands referred to (via
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>(ProfileKind & A) &&
static_cast<bool>(Other & B)) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d7b8531

Please sign in to comment.