| Index: src/IceAssemblerX8632.h
|
| diff --git a/src/IceAssemblerX8632.h b/src/IceAssemblerX8632.h
|
| index 8b13fc62ead65acadd912b65a5873b9eb64ff46c..8c672d06a3ee9b27659aa0baea3057c7f3c3246d 100644
|
| --- a/src/IceAssemblerX8632.h
|
| +++ b/src/IceAssemblerX8632.h
|
| @@ -14,9 +14,10 @@
|
| // License. See LICENSE.TXT for details.
|
| //
|
| //===----------------------------------------------------------------------===//
|
| -//
|
| -// This file implements the Assembler class for x86-32.
|
| -//
|
| +///
|
| +/// \file
|
| +/// This file implements the Assembler class for x86-32.
|
| +///
|
| //===----------------------------------------------------------------------===//
|
|
|
| #ifndef SUBZERO_SRC_ICEASSEMBLERX8632_H
|
| @@ -156,14 +157,14 @@ private:
|
|
|
| explicit Operand(GPRRegister reg) : fixup_(nullptr) { SetModRM(3, reg); }
|
|
|
| - // Get the operand encoding byte at the given index.
|
| + /// Get the operand encoding byte at the given index.
|
| uint8_t encoding_at(intptr_t index) const {
|
| assert(index >= 0 && index < length_);
|
| return encoding_[index];
|
| }
|
|
|
| - // Returns whether or not this operand is really the given register in
|
| - // disguise. Used from the assembler to generate better encodings.
|
| + /// Returns whether or not this operand is really the given register in
|
| + /// disguise. Used from the assembler to generate better encodings.
|
| bool IsRegister(GPRRegister reg) const {
|
| return ((encoding_[0] & 0xF8) == 0xC0) // Addressing mode is register only.
|
| && ((encoding_[0] & 0x07) == reg); // Register codes match.
|
| @@ -270,27 +271,27 @@ public:
|
| // TODO(jvoung): why are labels offset by this?
|
| static const uint32_t kWordSize = sizeof(uint32_t);
|
|
|
| - // Returns the position for bound labels (branches that come after this
|
| - // are considered backward branches). Cannot be used for unused or linked
|
| - // labels.
|
| + /// Returns the position for bound labels (branches that come after this
|
| + /// are considered backward branches). Cannot be used for unused or linked
|
| + /// labels.
|
| intptr_t Position() const {
|
| assert(IsBound());
|
| return -position_ - kWordSize;
|
| }
|
|
|
| - // Returns the position of an earlier branch instruction that was linked
|
| - // to this label (branches that use this are considered forward branches).
|
| - // The linked instructions form a linked list, of sorts, using the
|
| - // instruction's displacement field for the location of the next
|
| - // instruction that is also linked to this label.
|
| + /// Returns the position of an earlier branch instruction that was linked
|
| + /// to this label (branches that use this are considered forward branches).
|
| + /// The linked instructions form a linked list, of sorts, using the
|
| + /// instruction's displacement field for the location of the next
|
| + /// instruction that is also linked to this label.
|
| intptr_t LinkPosition() const {
|
| assert(IsLinked());
|
| return position_ - kWordSize;
|
| }
|
|
|
| - // Returns the position of an earlier branch instruction which
|
| - // assumes that this label is "near", and bumps iterator to the
|
| - // next near position.
|
| + /// Returns the position of an earlier branch instruction which
|
| + /// assumes that this label is "near", and bumps iterator to the
|
| + /// next near position.
|
| intptr_t NearPosition() {
|
| assert(HasNear());
|
| return unresolved_near_positions_[--num_unresolved_];
|
| @@ -382,7 +383,7 @@ public:
|
| return Asm->getKind() == Asm_X8632;
|
| }
|
|
|
| - // Operations to emit GPR instructions (and dispatch on operand type).
|
| + /// Operations to emit GPR instructions (and dispatch on operand type).
|
| typedef void (AssemblerX8632::*TypedEmitGPR)(Type, GPRRegister);
|
| typedef void (AssemblerX8632::*TypedEmitAddr)(Type, const Address &);
|
| struct GPREmitterOneOp {
|
| @@ -428,7 +429,7 @@ public:
|
| TypedEmitAddrImm AddrImm;
|
| };
|
|
|
| - // Operations to emit XMM instructions (and dispatch on operand type).
|
| + /// Operations to emit XMM instructions (and dispatch on operand type).
|
| typedef void (AssemblerX8632::*TypedEmitXmmXmm)(Type, XmmRegister,
|
| XmmRegister);
|
| typedef void (AssemblerX8632::*TypedEmitXmmAddr)(Type, XmmRegister,
|
| @@ -456,7 +457,7 @@ public:
|
| TypedEmitXmmImm XmmImm;
|
| };
|
|
|
| - // Cross Xmm/GPR cast instructions.
|
| + /// Cross Xmm/GPR cast instructions.
|
| template <typename DReg_t, typename SReg_t> struct CastEmitterRegOp {
|
| typedef void (AssemblerX8632::*TypedEmitRegs)(Type, DReg_t, SReg_t);
|
| typedef void (AssemblerX8632::*TypedEmitAddr)(Type, DReg_t,
|
| @@ -466,8 +467,8 @@ public:
|
| TypedEmitAddr RegAddr;
|
| };
|
|
|
| - // Three operand (potentially) cross Xmm/GPR instructions.
|
| - // The last operand must be an immediate.
|
| + /// Three operand (potentially) cross Xmm/GPR instructions.
|
| + /// The last operand must be an immediate.
|
| template <typename DReg_t, typename SReg_t> struct ThreeOpImmEmitter {
|
| typedef void (AssemblerX8632::*TypedEmitRegRegImm)(Type, DReg_t, SReg_t,
|
| const Immediate &);
|
| @@ -817,7 +818,7 @@ public:
|
| void ret();
|
| void ret(const Immediate &imm);
|
|
|
| - // 'size' indicates size in bytes and must be in the range 1..8.
|
| + /// 'size' indicates size in bytes and must be in the range 1..8.
|
| void nop(int size = 1);
|
| void int3();
|
| void hlt();
|
| @@ -870,16 +871,16 @@ private:
|
| GPRRegister shifter);
|
|
|
| typedef std::vector<Label *> LabelVector;
|
| - // A vector of pool-allocated x86 labels for CFG nodes.
|
| + /// A vector of pool-allocated x86 labels for CFG nodes.
|
| LabelVector CfgNodeLabels;
|
| - // A vector of pool-allocated x86 labels for Local labels.
|
| + /// A vector of pool-allocated x86 labels for Local labels.
|
| LabelVector LocalLabels;
|
|
|
| Label *GetOrCreateLabel(SizeT Number, LabelVector &Labels);
|
|
|
| - // The arith_int() methods factor out the commonality between the encodings of
|
| - // add(), Or(), adc(), sbb(), And(), sub(), Xor(), and cmp(). The Tag
|
| - // parameter is statically asserted to be less than 8.
|
| + /// The arith_int() methods factor out the commonality between the encodings
|
| + /// of add(), Or(), adc(), sbb(), And(), sub(), Xor(), and cmp(). The Tag
|
| + /// parameter is statically asserted to be less than 8.
|
| template <uint32_t Tag>
|
| void arith_int(Type Ty, GPRRegister reg, const Immediate &imm);
|
|
|
|
|