Fixed typos in documentation (#348)

This commit is contained in:
Kian Meng Ang
2021-11-13 16:24:21 +08:00
committed by GitHub
parent d0d14ac774
commit 4ec760a3d1
12 changed files with 15 additions and 15 deletions

View File

@@ -1129,7 +1129,7 @@ namespace asmjit {
//! Mem g = ptr(rax, xmm1, 2); // g = [rax + xmm1 << 2] //! Mem g = ptr(rax, xmm1, 2); // g = [rax + xmm1 << 2]
//! Mem h = ptr(rax, xmm1, 2, 15); // h = [rax + xmm1 << 2 + 15] //! Mem h = ptr(rax, xmm1, 2, 15); // h = [rax + xmm1 << 2 + 15]
//! //!
//! // Absolute adddress: //! // Absolute address:
//! uint64_t addr = (uint64_t)0x1234; //! uint64_t addr = (uint64_t)0x1234;
//! Mem i = ptr(addr); // i = [0x1234] //! Mem i = ptr(addr); // i = [0x1234]
//! Mem j = ptr(addr, rbx); // j = [0x1234 + rbx] //! Mem j = ptr(addr, rbx); // j = [0x1234 + rbx]
@@ -1452,7 +1452,7 @@ namespace asmjit {
//! AsmJit's \ref Logger serves the following purposes: //! AsmJit's \ref Logger serves the following purposes:
//! - Provides a basic foundation for logging. //! - Provides a basic foundation for logging.
//! - Abstract class leaving the implementation on users. The following built-in //! - Abstract class leaving the implementation on users. The following built-in
//! inplementations are provided for simplicty: //! implementations are provided for simplicity:
//! - \ref FileLogger implements logging into a standard `FILE` stream. //! - \ref FileLogger implements logging into a standard `FILE` stream.
//! - \ref StringLogger serializes all logs into a \ref String instance. //! - \ref StringLogger serializes all logs into a \ref String instance.
//! //!

View File

@@ -108,7 +108,7 @@ struct Expression {
uint64_t constant; uint64_t constant;
//! Pointer to another expression. //! Pointer to another expression.
Expression* expression; Expression* expression;
//! Poitner to \ref LabelEntry. //! Pointer to \ref LabelEntry.
LabelEntry* label; LabelEntry* label;
}; };

View File

@@ -589,9 +589,9 @@ public:
ASMJIT_NONCOPYABLE(InvokeNode) ASMJIT_NONCOPYABLE(InvokeNode)
//! Operand pack provides multiple operands that can be associated with a //! Operand pack provides multiple operands that can be associated with a
//! single return value of function argument. Sometims this is necessary to //! single return value of function argument. Sometimes this is necessary to
//! express an argument or return value that requires multiple registers, for //! express an argument or return value that requires multiple registers, for
//! example 64-bit value in 32-bit mode or passing / returning homogenous data //! example 64-bit value in 32-bit mode or passing / returning homogeneous data
//! structures. //! structures.
struct OperandPack { struct OperandPack {
//! Operands. //! Operands.

View File

@@ -685,7 +685,7 @@ public:
//! //!
//! \note This function is virtual and can be overridden, however, if you //! \note This function is virtual and can be overridden, however, if you
//! do so, always call \ref BaseEmitter::onSettingsUpdated() within your //! do so, always call \ref BaseEmitter::onSettingsUpdated() within your
//! own implementation to ensure that the emitter is in a consisten state. //! own implementation to ensure that the emitter is in a consistent state.
ASMJIT_API virtual void onSettingsUpdated() noexcept; ASMJIT_API virtual void onSettingsUpdated() noexcept;
//! \} //! \}

View File

@@ -355,7 +355,7 @@ public:
return _packed() == 0; return _packed() == 0;
} }
//! Tests whether the environment is intialized, which means it must have //! Tests whether the environment is initialized, which means it must have
//! a valid architecture. //! a valid architecture.
inline bool isInitialized() const noexcept { inline bool isInitialized() const noexcept {
return _arch != kArchUnknown; return _arch != kArchUnknown;

View File

@@ -68,7 +68,7 @@ class BaseEmitter;
//! the error, but lets AsmJit continue: //! the error, but lets AsmJit continue:
//! //!
//! ``` //! ```
//! // Error Handling #1 - Logging and returing Error. //! // Error Handling #1 - Logging and returning Error.
//! #include <asmjit/x86.h> //! #include <asmjit/x86.h>
//! #include <stdio.h> //! #include <stdio.h>
//! //!

View File

@@ -134,7 +134,7 @@ public:
//! Creates a new BaseInst instance with `id` and `options` set. //! Creates a new BaseInst instance with `id` and `options` set.
//! //!
//! Default values of `id` and `options` are zero, which means none instruciton. //! Default values of `id` and `options` are zero, which means none instruction.
//! Such instruction is guaranteed to never exist for any architecture supported //! Such instruction is guaranteed to never exist for any architecture supported
//! by AsmJit. //! by AsmJit.
inline explicit BaseInst(uint32_t id = 0, uint32_t options = 0) noexcept inline explicit BaseInst(uint32_t id = 0, uint32_t options = 0) noexcept

View File

@@ -139,7 +139,7 @@ struct Operand_ {
//! Data specific to the operand type. //! Data specific to the operand type.
//! //!
//! The reason we don't use union is that we have `constexpr` constructors that //! The reason we don't use union is that we have `constexpr` constructors that
//! construct operands and other `constexpr` functions that return wither another //! construct operands and other `constexpr` functions that return whether another
//! Operand or something else. These cannot generally work with unions so we also //! Operand or something else. These cannot generally work with unions so we also
//! cannot use `union` if we want to be standard compliant. //! cannot use `union` if we want to be standard compliant.
uint32_t _data[2]; uint32_t _data[2];

View File

@@ -508,7 +508,7 @@ public:
// [Utilities] // [Utilities]
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
//! Called when a `node` is removed, e.g. bacause of a dead code elimination. //! Called when a `node` is removed, e.g. because of a dead code elimination.
void removeNode(BaseNode* node) noexcept { void removeNode(BaseNode* node) noexcept {
logNode(node, kRootIndentation, "<Removed>"); logNode(node, kRootIndentation, "<Removed>");
cc()->removeNode(node); cc()->removeNode(node);

View File

@@ -126,7 +126,7 @@ Error ZoneBitVector::copyFrom(ZoneAllocator* allocator, const ZoneBitVector& oth
} }
if (newSize > _capacity) { if (newSize > _capacity) {
// Realloc needed... Calculate the minimum capacity (in bytes) requied. // Realloc needed... Calculate the minimum capacity (in bytes) required.
uint32_t minimumCapacityInBits = Support::alignUp<uint32_t>(newSize, kBitWordSizeInBits); uint32_t minimumCapacityInBits = Support::alignUp<uint32_t>(newSize, kBitWordSizeInBits);
if (ASMJIT_UNLIKELY(minimumCapacityInBits < newSize)) if (ASMJIT_UNLIKELY(minimumCapacityInBits < newSize))
return DebugUtils::errored(kErrorOutOfMemory); return DebugUtils::errored(kErrorOutOfMemory);
@@ -186,7 +186,7 @@ Error ZoneBitVector::_resize(ZoneAllocator* allocator, uint32_t newSize, uint32_
BitWord* data = _data; BitWord* data = _data;
if (newSize > _capacity) { if (newSize > _capacity) {
// Realloc needed, calculate the minimum capacity (in bytes) requied. // Realloc needed, calculate the minimum capacity (in bytes) required.
uint32_t minimumCapacityInBits = Support::alignUp<uint32_t>(idealCapacity, kBitWordSizeInBits); uint32_t minimumCapacityInBits = Support::alignUp<uint32_t>(idealCapacity, kBitWordSizeInBits);
if (ASMJIT_UNLIKELY(minimumCapacityInBits < newSize)) if (ASMJIT_UNLIKELY(minimumCapacityInBits < newSize))

View File

@@ -460,7 +460,7 @@ ASMJIT_BEGIN_SUB_NAMESPACE(x86)
//! //!
//! // Jump annotation is a building block that allows to annotate all //! // Jump annotation is a building block that allows to annotate all
//! // possible targets where `jmp()` can jump. It then drives the CFG //! // possible targets where `jmp()` can jump. It then drives the CFG
//! // contruction and liveness analysis, which impacts register allocation. //! // construction and liveness analysis, which impacts register allocation.
//! JumpAnnotation* annotation = cc.newJumpAnnotation(); //! JumpAnnotation* annotation = cc.newJumpAnnotation();
//! annotation->addLabel(L_Add); //! annotation->addLabel(L_Add);
//! annotation->addLabel(L_Sub); //! annotation->addLabel(L_Sub);

View File

@@ -221,7 +221,7 @@ public:
kGroupBnd = BaseReg::kGroupVirt+4, kGroupBnd = BaseReg::kGroupVirt+4,
//! TMM register group. //! TMM register group.
kGroupTmm = BaseReg::kGroupVirt+5, kGroupTmm = BaseReg::kGroupVirt+5,
//! Instrucion pointer (IP). //! Instruction pointer (IP).
kGroupRip = BaseReg::kGroupVirt+6, kGroupRip = BaseReg::kGroupVirt+6,
//! Count of all register groups. //! Count of all register groups.